Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeRDark
titleBSSS packet structure
struct firmwareBSSSPacket{
	uint64_t sec;
 	uint64_t pid;
	uint32_t channelMask;
	uint32_t serviceMask;
	uint32_t channelData0;
    ...
 	uint32_t channelData30; 
	uint64?t severityMaskçseverityMask;
}


The reported number channel data in the packet is variable and necessaly all of the channels will have data. The BSSS callback source code uses the channelMask to identify if the channel data is available or not.

...

This device support for BSSS was developed to override the asyn parameters. Apparently the asyn based PVs increase the CPU load significantly. The header file contains functions that will be accessed by external source to update the relevant records. 2 device support records are created

  • 64-bit integer (devBsssPid)
  • Double (devBsssV)

The device support structures are defined as follows

Code Block
languagecpp
themeRDark
titleDevice support
struct {
        long            number;
        DEVSUPFUN       report;
        DEVSUPFUN       init;
        DEVSUPFUN       init_record;
        DEVSUPFUN       get_ioint_info;
        DEVSUPFUN       read;
}devBsssPid={
        5,
        NULL,
        NULL,
        init_record_pid,
        get_ioint_info,
        read_pid
};

struct {
        long            number;
        DEVSUPFUN       report;
        DEVSUPFUN       init;
        DEVSUPFUN       init_record;
        DEVSUPFUN       get_ioint_info;
        DEVSUPFUN       read;
        DEVSUPFUN       speical_linconv;
}devBsssV={
        6,
        NULL,
        NULL,
        init_record_v,
        get_ioint_info,
        read_v,
        NULL
};

epicsExportAddress(dset, devBsssPid);
epicsExportAddress(dset, devBsssV);


The structure of these structures come from aiRecord.h and int64inRecord.h files. Once the functions are defined and their function addresses are given to the structure, the structures must be exported using the epicsExportAddress command. At this point, the device supports exist, but are still not enabled for usage. the new device supports need to be added to the dbd file (bsaAsynDriver.dbd) using the following commands:


Code Block
languagecpp
themeRDark
titleDevice support DBD commands
device(int64in, INST_IO, devBsssPid, "BSSS")
device(ai,      INST_IO, devBsssV,   "BSSS")

These lines state that the device support devBsssPid overloads the device support of int64in record type, and the devBsssV overloads the device support of ai record type. The last parameter denotes the DTYP field in the db file. The following slide taken from one of the EPICS trainings may help visualize what is what

Image Added