qavrg 0.0.28
Functions | Variables
qavrgfillpattern.cpp File Reference
#include "qavrgfillpattern.h"
#include <epics/cadef.h>
#include <stdio.h>
Include dependency graph for qavrgfillpattern.cpp:

Go to the source code of this file.

Functions

static void valueChanged (struct event_handler_args args)
static void connectionChanged (struct connection_handler_args args)

Variables

static const long MAGIC_VALUE = 0xdeadbeef

Function Documentation

static void connectionChanged ( struct connection_handler_args  args) [static]

Definition at line 32 of file qavrgfillpattern.cpp.

References valueChanged().

Referenced by QavrgFillPattern::QavrgFillPattern().

{
  chid pCh = args.chid;
  int stat;

  switch (ca_state(pCh)) {

  case cs_conn:
    printf("Connected to %s\n", ca_name(pCh));
    stat = ca_array_get_callback(DBR_CHAR,ca_element_count(pCh),pCh,
                                 valueChanged,NULL);
    if (stat != ECA_NORMAL) {
      printf("ca_array_get_callback:\n%s\n", ca_message(stat));
      return;
    }

    break;

  case cs_never_conn:
    printf("Cannot connect to %s\n", ca_name(pCh));
    break;

  case cs_prev_conn:
    printf("Lost connection to %s\n", ca_name(pCh));
    break;

  case cs_closed:
    printf("Connection closed %s\n", ca_name(pCh));
    break;
  }
}
static void valueChanged ( struct event_handler_args  args) [static]

Definition at line 64 of file qavrgfillpattern.cpp.

References QavrgFillPattern::valueChanged().

Referenced by connectionChanged(), QavrgTestInteger::linkTo(), QavrgAcquisition::QavrgAcquisition(), and QavrgWindow::setAcquisition().

{
  if (args.status == ECA_NORMAL && args.dbr) {
    QavrgFillPattern *patt = reinterpret_cast<QavrgFillPattern*>(ca_puser(args.chid));

    if (patt) {
      patt->valueChanged(args);
    }
  }
}

Variable Documentation

const long MAGIC_VALUE = 0xdeadbeef [static]

Definition at line 8 of file qavrgfillpattern.cpp.

Referenced by QavrgFillPattern::valueChanged().