12#error This is a C++ include file and cannot be used from plain C
26#define ngcbIFC_TIMEOUT_DEFAULT 5
31#define ngcbIFC_CLASS_VERSION 0x00000001
36#define ngcbIFC_OP_WR 0x0
37#define ngcbIFC_OP_RD 0x1
38#define ngcbIFC_OP_EVT 0x2
43#define ngcbEVT_PENDING -1
44#define ngcbEVT_SUCCESS 0
45#define ngcbEVT_TIMEOUT 1
46#define ngcbEVT_FAILURE 2
47#define ngcbEVT_INVALID 3
48#define ngcbEVT_COND_FAIL 0x00010000
53#define RPC_STATE_INVALID 0x00000000
54#define RPC_STATE_SEND 0x00000001
55#define RPC_STATE_RECEIVED 0x00000002
56#define RPC_STATE_WAITING 0x00000003
57#define RPC_STATE_DONE 0x000000FF
58#define RPC_STATE_BUSY 0x40000000
59#define RPC_STATE_ERROR 0x80000000
60#define RPC_STATE_ERROR_UNKNOWN_CMD (RPC_STATE_ERROR | 1)
61#define RPC_STATE_ERROR_BUSY (RPC_STATE_ERROR | 2)
62#define RPC_STATE_ERROR_OUT_OF_MEMORY (RPC_STATE_ERROR | 3)
63#define RPC_STATE_ERROR_TOO_LONG (RPC_STATE_ERROR | 4)
64#define RPC_STATE_ERROR_UNKNOWN_DEVICE (RPC_STATE_ERROR | 5)
65#define RPC_STATE_ERROR_BUFFER_TOO_SMALL (RPC_STATE_ERROR | 6)
66#define RPC_STATE_ERROR_UNKNOWN_CHANNEL (RPC_STATE_ERROR | 7)
67#define RPC_STATE_ERROR_TRANSFER_FAILED (RPC_STATE_ERROR | 8)
97 if (board < 1) board = 1;
99 for (i=0;i<(board - 1);i++)
hdr[i] = 0x5;
111 for (i=0;i<
numHdr;i++)
if (
hdr[i] != other.
hdr[i])
return (
false);
159 if (i > 0) sprintf(tmp,
",%d",
hdr[i]);
160 else sprintf(tmp,
"%d",
hdr[i]);
181 void Setup(
int v) {value_ = v; setup_ = 1;}
252 if (!(
reg[i] == other.
reg[i]))
556 int x = value &
mask;
557 int c =
cond & 0xffff;
688 void Add(
int board,
int addr,
int mask,
int reference,
int cnd = 1) {
689 if ((n_ < size_) && (board > 0) && (board <=
ngcbMAX_MOD))
700 Add(r.
Board(), addr, mask, reference, cnd);
743 struct timeval timeStamp_;
749#define ngcbIFC_HDR_SIZE (3 + ngcbMAX_MOD + 1)
760 explicit ngcbIFC(
const char *name);
866 void ErrState(
const char *msg,
int errorId = 0,
void *origin = NULL);
872 void Verbose(
const char *format, ...)
873 __attribute__ ((format(printf, 2, 3)));
876 void Log(const
char *format, ...)
877 __attribute__ ((format(printf, 2, 3)));
909 int SetTime(
double time = 0.0);
958 int WriteBuffer(const
int *buffer,
int size,
int *result);
964 int ReadAddr(
int addr,
int *buffer,
int size = 1);
967 int WriteAddr(
int addr, const
int *buffer,
int size);
981 int ReadAddr64(
int addr, uint64_t *buffer,
int size = 1);
984 int WriteAddr64(
int addr, const uint64_t *buffer,
int size);
1001 int Wait(
ngcbEVT *evt,
int interval,
int *result);
1037 int SetChanSrc(
int idx,
int src = 0,
int flag = -1);
1074 virtual const
char *
Host();
1077 virtual
int Sim(
int level);
1080 virtual
int Open(const
char *name);
1083 virtual
int Close();
1095 virtual
void Keeper(
int seconds);
1098 virtual
int Reset();
1101 virtual
int Timeout(
int seconds);
1107 virtual
int SetTime(uint64_t sec, uint64_t nsec);
1110 virtual
void RpcCopy(
void *dest, const
void *src,
size_t size,
size_t items);
1113 virtual
int Str2Payload(const
char *cmd,
unsigned char *payload,
1114 unsigned int max,
char *erms);
1117 virtual
int RPC(
int mod,
int target,
int req,
void *payload,
1118 unsigned int size,
unsigned int *status);
1121 virtual
int Read(
int *buffer,
int size);
1124 virtual
int Write(const
int *buffer,
int size);
1132 int size,
int *result);
1138 virtual
int Status(
int *devStatus);
1159 virtual
int TsuStartAt(uint64_t sec, uint64_t nsec);
1197 int size,
int *result);
1201 virtual
int SetupCB(const
char *buffer);
1208 char thisVersion_[128];
1220 char setupString_[64];
1244 int testBuffer_[1024];
1265 int IfcRead_(
int addr);
1268 void IfcWrite_(
int addr,
int value);
1276 virtual
int ReadLocal_(
int addr,
int *value);
1279 virtual
int WriteLocal_(
int addr,
int value);
1282 virtual
int ReadCfg_(
int addr,
int *value);
1285 virtual
int WriteCfg_(
int addr,
int value);
1293 int ScaRead_(const
ngcb_route_t &route,
int addr,
int sid,
int flags,
1294 int *buffer,
int size,
int *result);
1297 int ScaWrite_(const
ngcb_route_t &route,
int addr,
int sid,
int flags,
1298 const
int *buffer,
int size,
int *result);
1301 int ScaReadBlock_(const
ngcb_route_t &route,
int addr,
int sid,
int flags,
1302 int *buffer,
int size,
int *result);
1305 int ScaWriteBlock_(const
ngcb_route_t &route,
int addr,
int sid,
int flags,
1306 const
int *buffer,
int size,
int *result);
1309 int ScaCRC16_(const
int *buffer,
int size);
1327 route_.numHdr = r.
numHdr;
1328 for (i=0;i<r.
numHdr;i++) route_.hdr[i] = r.
hdr[i];
1343 int OutCB(
int d,
int *resultCode,
char *erms) {
1349 if (dev_->verboseLevel > 1)
1353 dev_->Verbose(
"ngcbI2C: <%s>\n", s);
1362 strcpy(erms, dev_->ErrMsg());
1376 int InCB(
int *d,
int *resultCode,
char *erms) {
1388 strcpy(erms, dev_->ErrMsg());
1428 route_.numHdr = r.
numHdr;
1429 for (i=0;i<r.
numHdr;i++) route_.hdr[i] = r.
hdr[i];
1439 int OutCB(
int side,
int d,
int *resultCode,
char *erms) {
1452 if (dev_->verboseLevel > 1)
1456 dev_->Verbose(
"ngcbAFE: <%s> <0x%04x>\n", s, d & 0xffff);
1462 if (dev_->_WriteAddr(route_, addr, &d, 1,
1465 strcpy(erms, dev_->ErrMsg());
int tmo
Timeout for microsleep.
Definition ngcbIFC.hpp:1418
ngcbAFE_IO(ngcbIFC *dev, ngcb_route_t r)
Constructor.
Definition ngcbIFC.hpp:1421
int OutCB(int side, int d, int *resultCode, char *erms)
Write one word (call-back)
Definition ngcbIFC.hpp:1439
virtual ~ngcbAFE_IO()
Destructor.
Definition ngcbIFC.hpp:1435
ngcbAFE()
Constructor.
Definition ngcbAFE.hpp:25
Definition ngcbIFC.hpp:595
int id
Event id.
Definition ngcbIFC.hpp:598
int async
Asynchronous event notification.
Definition ngcbIFC.hpp:601
ngcb_evt_t * component
Device event components.
Definition ngcbIFC.hpp:613
void Add(const ngcb_evt_t &evt)
Add event component.
Definition ngcbIFC.hpp:685
ngcbEVT(size_t size)
Constructor.
Definition ngcbIFC.hpp:635
ngcbEVT & operator=(const ngcbEVT &other)
Operator =.
Definition ngcbIFC.hpp:659
void TimeStamp()
Event timestamp.
Definition ngcbIFC.hpp:704
int done
Done.
Definition ngcbIFC.hpp:610
virtual ~ngcbEVT()
Destructor.
Definition ngcbIFC.hpp:651
size_t Size()
Return number of list components.
Definition ngcbIFC.hpp:682
int timeout
Timeout (seconds)
Definition ngcbIFC.hpp:607
ngcbEVT(const ngcbEVT &other)
Copy constructor.
Definition ngcbIFC.hpp:616
void Add(const ngcb_route_t &r, int addr, int mask, int reference, int cnd=1)
Add explicit event (on board indexed by route)
Definition ngcbIFC.hpp:698
int Timeout()
Check for timeout.
Definition ngcbIFC.hpp:707
int cond
Event condition: 0 = any, 1 = all (default)
Definition ngcbIFC.hpp:604
void Add(int board, int addr, int mask, int reference, int cnd=1)
Add explicit event (on board)
Definition ngcbIFC.hpp:688
int OutCB(int d, int *resultCode, char *erms)
Write one word (call-back)
Definition ngcbIFC.hpp:1343
virtual ~ngcbI2C_IO()
Destructor.
Definition ngcbIFC.hpp:1336
int InCB(int *d, int *resultCode, char *erms)
Read one word (call-back)
Definition ngcbIFC.hpp:1376
int tmo
Timeout for microsleep.
Definition ngcbIFC.hpp:1340
ngcbI2C_IO(ngcbIFC *dev, ngcb_route_t r, int cnt)
Constructor.
Definition ngcbIFC.hpp:1319
ngcbI2C()
Definition ngcbI2C.hpp:43
void ACK_IN(int bit)
Define ack-line bit.
Definition ngcbI2C.hpp:99
void SDA_DIR_SWITCH(int bit)
Define SDA direction switch bit.
Definition ngcbI2C.hpp:102
Definition ngcbIFC.hpp:754
int SetChanSrc(int idx, int src=0, int flag=-1)
Enable/disable channel source.
Definition ngcbIFC.cpp:3649
virtual int Port()
Driver interface process command port.
Definition ngcbIFC.cpp:262
int protocol
Incremental protovol id.
Definition ngcbIFC.hpp:826
virtual int TsuStop()
Stop TSU trigger.
Definition ngcbIFC.cpp:2093
int backPlane
Back-plane id.
Definition ngcbIFC.hpp:790
int GetChanMudpi(int idx, ngcb_chan_mudpi_t *mudpi)
Get RTMS channel MUDPI configuration.
Definition ngcbIFC.cpp:3505
void ErrState(const char *msg, int errorId=0, void *origin=NULL)
Go to error state with error message.
Definition ngcbIFC.cpp:2163
char * Type()
Interface type.
Definition ngcbIFC.cpp:230
virtual int TsuRunning()
Definition ngcbIFC.cpp:2097
virtual int Reset()
Reset device.
Definition ngcbIFC.cpp:536
virtual ~ngcbIFC()
Destructor.
Definition ngcbIFC.cpp:44
int serNo2
Interface board serial number part two.
Definition ngcbIFC.hpp:808
void Result2Err(char *s, int resultCode)
Convert result code to error string.
Definition ngcbIFC.cpp:2181
char * Name()
Device name.
Definition ngcbIFC.cpp:228
virtual int Read(int *buffer, int size)
Read buffer from device.
Definition ngcbIFC.cpp:682
FILE * watchdog
External watchdog stream.
Definition ngcbIFC.hpp:766
void Verbose(const char *format,...) __attribute__((format(printf
Verbose message.
Definition ngcbIFC.cpp:2100
int xterm
Start in new terminal.
Definition ngcbIFC.hpp:847
int tsuCtrl
Enable/disable automatic start/stop of the TSU.
Definition ngcbIFC.hpp:841
int SetChanBits(int idx, int bits)
Set number of enabled bits on channel.
Definition ngcbIFC.cpp:3777
int translate
RPC payload translation method.
Definition ngcbIFC.hpp:856
int SyncFwd(int flag)
Forward SYNC signal.
Definition ngcbIFC.cpp:2292
int skip
Number of route nodes to skip.
Definition ngcbIFC.hpp:796
int version
Board version (sub-type)
Definition ngcbIFC.hpp:817
virtual int Pid()
Driver interface process id.
Definition ngcbIFC.cpp:253
virtual int Close()
Close interface.
Definition ngcbIFC.cpp:461
virtual int _WriteAddr(ngcb_route_t route, int addr, const int *buffer, int size, int *result)
Write to adress.
Definition ngcbIFC.cpp:1399
int Event(ngcbEVT *evt)
Activate device event.
Definition ngcbIFC.cpp:1958
ngcbSERVICE * services
System services.
Definition ngcbIFC.hpp:769
int SetRtmsNet(ngcb_rtms_net net)
Set RTMS common parameters.
Definition ngcbIFC.cpp:3448
int GetChanRtms(int idx, ngcb_chan_rtms_t *rtms)
Get RTMS channel RTMS configuration.
Definition ngcbIFC.cpp:3539
int GetChanDrop(int idx, int src, int *flag)
Get channel source drop flag.
Definition ngcbIFC.cpp:3722
int sideLink
Connected through sidelink.
Definition ngcbIFC.hpp:787
int Instance()
Get interface instance.
Definition ngcbIFC.cpp:234
virtual int Connect()
Connect through to device.
Definition ngcbIFC.cpp:504
virtual int TsuSnapshot()
Take TSU snapshot.
Definition ngcbIFC.cpp:2098
void DefaultTimeout(int seconds)
Set default timeout.
Definition ngcbIFC.cpp:618
virtual int _ReadAddr(ngcb_route_t route, int addr, int *buffer, int size, int *result)
Read from address.
Definition ngcbIFC.cpp:1248
void void const char * SofwVersion()
Software version.
Definition ngcbIFC.cpp:226
int id
ID-register content.
Definition ngcbIFC.hpp:811
char * Arg()
Driver interface process arguments.
Definition ngcbIFC.cpp:232
char thisHost[64]
Host where this instance is launched.
Definition ngcbIFC.hpp:778
int GetChanSrc(int idx, int src, int *flag)
Get enabled-flag per source and channel.
Definition ngcbIFC.cpp:3690
virtual int Write(const int *buffer, int size)
Write buffer to device.
Definition ngcbIFC.cpp:730
int WriteAddr64(const ngcb_route_t &route, int addr, const uint64_t *buffer, int size)
64-bit write
Definition ngcbIFC.cpp:1604
int ReadAddr64(const ngcb_route_t &route, int addr, uint64_t *buffer, int size)
64-bit read
Definition ngcbIFC.cpp:1598
int SetChanMudpi(int idx, ngcb_chan_mudpi_t mudpi)
Set RTMS channel MUDPI configuration.
Definition ngcbIFC.cpp:3393
virtual int RPC(int mod, int target, int req, void *payload, unsigned int size, unsigned int *status)
RPC.
Definition ngcbIFC.cpp:674
int Online()
Bring interface to ONLINE state.
Definition ngcbIFC.cpp:2489
char * ErrMsg()
Pointer to last error message.
Definition ngcbIFC.cpp:2155
int verboseLevel
Verbose level.
Definition ngcbIFC.hpp:850
virtual int SetupCB(const char *buffer)
Setup call-back.
Definition ngcbIFC.cpp:657
int SyncSize(int size)
Set SYNC packet size.
Definition ngcbIFC.cpp:2312
void void Log(const char *format,...) __attribute__((format(printf
Log message.
Definition ngcbIFC.cpp:2136
virtual int Ping()
Ping device.
Definition ngcbIFC.cpp:532
virtual const char * Host()
Driver interface process host.
Definition ngcbIFC.cpp:271
int firmware
Firmware revision.
Definition ngcbIFC.hpp:823
int SyncWithData(int flag)
SYNC with data-valid.
Definition ngcbIFC.cpp:2272
void Poll()
Poll event list.
Definition ngcbIFC.cpp:1970
int ioError
Indicates an i/o error.
Definition ngcbIFC.hpp:772
int ClearChanDrop(int idx)
Clear channel drop flags.
Definition ngcbIFC.cpp:3754
int GetRtmsNet(ngcb_rtms_net *net)
Get RTMS common parameters.
Definition ngcbIFC.cpp:3568
virtual int Str2Payload(const char *cmd, unsigned char *payload, unsigned int max, char *erms)
Parse string to RPC payload.
Definition ngcbIFC.cpp:668
int SetChanShift(int idx, int shift)
Set channel bit shift.
Definition ngcbIFC.cpp:3831
ngcb_sctl_t sync
SYNC signal control.
Definition ngcbIFC.hpp:829
int master
Index of master device.
Definition ngcbIFC.hpp:793
int GetChanBits(int idx, int *bits)
Get number of enabled bits on channel.
Definition ngcbIFC.cpp:3802
int GetChanShift(int idx, int *shift)
Get channel bit shift.
Definition ngcbIFC.cpp:3856
int local
Interface is local.
Definition ngcbIFC.hpp:775
virtual int Disconnect()
Disconnect from device.
Definition ngcbIFC.cpp:517
int Configure(const char *s)
Configure interface device via interface setup identification string.
Definition ngcbIFC.cpp:2333
int type
Board type.
Definition ngcbIFC.hpp:814
virtual void Keeper(int seconds)
Set line keeper interval (seconds)
Definition ngcbIFC.cpp:534
int Open()
Open interface with current name.
Definition ngcbIFC.cpp:316
virtual int TsuStartAt(uint64_t sec, uint64_t nsec)
Definition ngcbIFC.cpp:2087
virtual int KillServer()
Terminate driver interface process.
Definition ngcbIFC.cpp:2035
virtual int Connected()
Connected to device.
Definition ngcbIFC.cpp:2052
int serNo1
Interface board serial number part one.
Definition ngcbIFC.hpp:805
int revision
Hardware revision.
Definition ngcbIFC.hpp:820
int SetTime(double time=0.0)
Set device time (seconds since UNIX epoch, time <= 0.0 sets system time).
Definition ngcbIFC.cpp:626
int ReadAddr(const ngcb_route_t &route, int addr, int *buffer, int size)
Read from address.
Definition ngcbIFC.cpp:1541
int WriteBuffer(const int *buffer, int size, int *result)
Write formatted buffer to device.
Definition ngcbIFC.cpp:1641
int WriteAddr(const ngcb_route_t &route, int addr, const int *buffer, int size)
Write to address.
Definition ngcbIFC.cpp:1554
int keeper
Line keeper interval (seconds)
Definition ngcbIFC.hpp:784
int CheckEvent(ngcbEVT *evt, int *result)
Check if device event conditions are met.
Definition ngcbIFC.cpp:1728
virtual int Status(int *devStatus)
Get communication status.
Definition ngcbIFC.cpp:2006
ngcbLIST evtList
Device event list.
Definition ngcbIFC.hpp:995
int Off()
Bring interface to OFF state.
Definition ngcbIFC.cpp:2641
int logLevel
Logging level.
Definition ngcbIFC.hpp:853
int BigEndian()
Get endianess.
Definition ngcbIFC.cpp:238
virtual int Running()
Driver interface process is running.
Definition ngcbIFC.cpp:2044
int GetChanIp(int idx, ngcb_chan_ip_t *ip)
Get RTMS channel IP configuration.
Definition ngcbIFC.cpp:3473
virtual int TsuConfig(ngcb_tsu_t *cfg)
Get TSU configuration.
Definition ngcbIFC.cpp:2096
int Standby()
Bring interface to STANDBY state.
Definition ngcbIFC.cpp:2455
virtual int HandleFdEvt()
Handle event on file descriptor.
Definition ngcbIFC.cpp:2061
ngcb_route_t cfgRoute
Configuration route.
Definition ngcbIFC.hpp:802
virtual int Sim(int level)
Set simulation level.
Definition ngcbIFC.cpp:280
int SetChanIp(int idx, ngcb_chan_ip_t ip)
Set RTMS channel IP configuration.
Definition ngcbIFC.cpp:3366
ngcb_rtms_cfg_t rtms
RTMS configuration (WFS)
Definition ngcbIFC.hpp:832
int SetChanRtms(int idx, ngcb_chan_rtms_t rtms)
Set RTMS channel RTMS configuration.
Definition ngcbIFC.cpp:3422
int SetChanEnable(int idx, int flag)
Enable/disable RTMS channel.
Definition ngcbIFC.cpp:3598
int netTimeout
Network timeout (seconds)
Definition ngcbIFC.hpp:781
virtual int ExecServer()
Launch driver interface process.
Definition ngcbIFC.cpp:2026
virtual void RpcCopy(void *dest, const void *src, size_t size, size_t items)
Copy RPC payload.
Definition ngcbIFC.cpp:663
int chain
Chain length from last skipped node to DFE.
Definition ngcbIFC.hpp:799
ngcb_rtms_if rtmsIf
RTMS interface (NGCII)
Definition ngcbIFC.hpp:835
int GetChanEnable(int idx, int *flag)
Get RTMS channel status (enabled/disabled)
Definition ngcbIFC.cpp:3622
const char * Setup()
Return actual interface setup identification string.
Definition ngcbIFC.cpp:2416
int sim
Interface simulation level.
Definition ngcbIFC.hpp:844
ngcbIFC()
Constructor without device name.
Definition ngcbIFC.cpp:33
virtual int TsuStatus(int *value)
Get TSU status.
Definition ngcbIFC.cpp:2095
ngcb_tsu_t tsu
TSU configuration.
Definition ngcbIFC.hpp:838
virtual int Timeout(int seconds)
Set timeout.
Definition ngcbIFC.cpp:594
virtual int Fd()
Return device file descriptor.
Definition ngcbIFC.cpp:244
virtual int TsuTrigger()
Manual TSU trigger.
Definition ngcbIFC.cpp:2094
int Wait(ngcbEVT *evt, int interval, int *result)
Wait for event.
Definition ngcbIFC.cpp:1865
virtual int TsuStart()
Start TSU trigger immediatly.
Definition ngcbIFC.cpp:2092
Definition ngcbLIST.hpp:33
Definition ngcbSERVICE.hpp:35
Definition ngcbSIM.hpp:151
Definition ngcbIFC.hpp:166
void Setup(int v)
Set value.
Definition ngcbIFC.hpp:181
int addr
Address.
Definition ngcbIFC.hpp:169
int Value()
Constructor.
Definition ngcbIFC.hpp:178
int Setup()
Check, if value has been set.
Definition ngcbIFC.hpp:184
void Reset()
Reset.
Definition ngcbIFC.hpp:187
ngcb_reg_t()
Constructor.
Definition ngcbIFC.hpp:172
Definition ngcbIFC.hpp:200
ngcb_rtms_cfg_t & operator=(const ngcb_rtms_cfg_t &other)
Operator =.
Definition ngcbIFC.hpp:261
ngcb_reg_t dest_ip
RTC-IF destination ip.
Definition ngcbIFC.hpp:230
ngcb_reg_t ds
RTC-IF DS.
Definition ngcbIFC.hpp:242
ngcb_reg_t leadingPadding
RTMS leading padding.
Definition ngcbIFC.hpp:212
bool operator==(const ngcb_rtms_cfg_t &other) const
Operator ==.
Definition ngcbIFC.hpp:248
ngcb_reg_t littleEndian
RTMS little endian.
Definition ngcbIFC.hpp:218
ngcb_rtms_cfg_t()
Constructor.
Definition ngcbIFC.hpp:291
ngcb_reg_t ttl
RTC-IF TTL.
Definition ngcbIFC.hpp:239
ngcb_reg_t * reg[14]
Register array.
Definition ngcbIFC.hpp:245
ngcb_reg_t gateway
RTC-IF gatewway.
Definition ngcbIFC.hpp:227
ngcb_reg_t trailingPadding
RTMS trailing padding.
Definition ngcbIFC.hpp:215
ngcb_reg_t subnet
RTC-IF subnet mask.
Definition ngcbIFC.hpp:224
ngcb_reg_t srcPort
RTC-IF source port.
Definition ngcbIFC.hpp:233
ngcb_reg_t topic
MUDPI topic.
Definition ngcbIFC.hpp:203
ngcb_reg_t component
MUDPI component.
Definition ngcbIFC.hpp:206
ngcb_rtms_cfg_t(const ngcb_rtms_cfg_t &other)
Copy constructor.
Definition ngcbIFC.hpp:278
ngcb_reg_t application
MUDPI application.
Definition ngcbIFC.hpp:209
void Reset()
Reset all registers.
Definition ngcbIFC.hpp:296
ngcb_reg_t local_ip
RTC-IF local ip.
Definition ngcbIFC.hpp:221
ngcb_reg_t destPort
RTC-IF destination port.
Definition ngcbIFC.hpp:236
#define ngcbRES_SUCCESS
Definition ngcbAddr.h:632
#define ngcbSEQ_STAT_WAITING
Definition ngcbAddr.h:213
#define ngcbI2C_CLK_LINE
Definition ngcbAddr.h:491
#define ngcbI2C_DATA_LINE
Definition ngcbAddr.h:492
#define ngcbAO_ADDR_AFE_L
Definition ngcbAddr.h:529
#define ngcbAO_ADDR_AFE_R
Definition ngcbAddr.h:530
#define ngcbSEQ_STAT_RUNNING
Definition ngcbAddr.h:212
#define ngcbMAX_MOD
Definition ngcbAddr.h:627
#define ngcbI2C_PORT
Definition ngcbAddr.h:490
#define ngcbEVT_SUCCESS
Definition ngcbIFC.hpp:44
#define ngcbEVT_COND_FAIL
Definition ngcbIFC.hpp:48
#define ngcbDiffTime(t1, t2)
Definition ngcb.h:308
int ngcbMicroSleep(int fd, int waitTime)
Definition ngcbTime.c:290
void ngcbInt2Bin(char *str, int in)
Definition ngcbMath.c:91
int ngcbGetTime(struct timeval *t)
Definition ngcbTime.c:40
#define ngcbSUCCESS
Definition ngcb.h:137
#define _vecsize(x)
Definition ngcb.h:79
Definition ngcbIFC.hpp:339
ngcb_chan_ip_t()
Constructor.
Definition ngcbIFC.hpp:347
int port
Destination port.
Definition ngcbIFC.hpp:344
int ip
Destination ip address.
Definition ngcbIFC.hpp:341
Definition ngcbIFC.hpp:353
int application
MUDPI application tag.
Definition ngcbIFC.hpp:361
int topic
MUDPI topic.
Definition ngcbIFC.hpp:355
int component
MUDPI component.
Definition ngcbIFC.hpp:358
ngcb_chan_mudpi_t()
Constructor.
Definition ngcbIFC.hpp:364
Definition ngcbIFC.hpp:370
int le
RTMS little-endian.
Definition ngcbIFC.hpp:378
ngcb_chan_rtms_t()
Constructor.
Definition ngcbIFC.hpp:381
int trailingPadding
RTMS trailing padding.
Definition ngcbIFC.hpp:375
int leadingPadding
RTMS leading padding.
Definition ngcbIFC.hpp:372
ngcb_evt_st_t(int i, int s)
Full constructor.
Definition ngcbIFC.hpp:586
int status
Event status.
Definition ngcbIFC.hpp:580
int id
Event id.
Definition ngcbIFC.hpp:577
ngcb_evt_st_t(int i)
Success constructor for id.
Definition ngcbIFC.hpp:589
ngcb_evt_st_t()
Constructor.
Definition ngcbIFC.hpp:583
Definition ngcbIFC.hpp:514
int addr
Address.
Definition ngcbIFC.hpp:519
int Failure()
Check failure condition.
Definition ngcbIFC.hpp:563
ngcb_evt_t()
Constructor.
Definition ngcbIFC.hpp:547
int board
Board number (1, ...)
Definition ngcbIFC.hpp:516
int mask
32-bit mask
Definition ngcbIFC.hpp:522
ngcb_evt_t(const ngcb_evt_t &other)
Copy constructor.
Definition ngcbIFC.hpp:541
int reference
32-bit reference value
Definition ngcbIFC.hpp:525
ngcb_route_t Route()
Return route to board.
Definition ngcbIFC.hpp:566
int cond
Condition: 0 = match any, 1 = match all (default)
Definition ngcbIFC.hpp:528
ngcb_evt_t & operator=(const ngcb_evt_t &other)
Operator =.
Definition ngcbIFC.hpp:531
int Check(int value)
Check event status.
Definition ngcbIFC.hpp:555
ngcb_ifc_err(const ngcb_ifc_err &other)
Copy constructor.
Definition ngcbIFC.hpp:1505
void * origin
Definition ngcbIFC.hpp:1492
ngcb_ifc_err(void *o, ngcbIFC *d)
Fully classified constructor.
Definition ngcbIFC.hpp:1516
ngcb_ifc_err & operator=(const ngcb_ifc_err &other)
Operator =.
Definition ngcbIFC.hpp:1496
ngcb_ifc_err()
Constructor.
Definition ngcbIFC.hpp:1513
ngcbIFC * device
Definition ngcbIFC.hpp:1493
Definition ngcbIFC.hpp:72
int Board() const
Return board number.
Definition ngcbIFC.hpp:128
int Last() const
Return last routing instruction.
Definition ngcbIFC.hpp:140
bool operator==(const ngcb_route_t &other) const
Operator ==.
Definition ngcbIFC.hpp:106
int hdr[ngcbMAX_MOD]
Route instructions.
Definition ngcbIFC.hpp:77
void Print(char *s) const
Print route to string.
Definition ngcbIFC.hpp:152
ngcb_route_t & operator=(const ngcb_route_t &other)
Operator =.
Definition ngcbIFC.hpp:117
int numHdr
Number of headers in route.
Definition ngcbIFC.hpp:74
ngcb_route_t(const ngcb_route_t &other)
Copy constructor.
Definition ngcbIFC.hpp:80
ngcb_route_t(int board)
Constructor with board number.
Definition ngcbIFC.hpp:95
ngcb_route_t()
Constructor.
Definition ngcbIFC.hpp:88
Definition ngcbIFC.hpp:387
ngcb_rtms_chan()
Constructor.
Definition ngcbIFC.hpp:410
int bits
Number of bits per sample.
Definition ngcbIFC.hpp:392
int enable
Enable channel.
Definition ngcbIFC.hpp:389
ngcb_chan_mudpi_t mudpi
RTMS channel MUDPI configuration.
Definition ngcbIFC.hpp:404
int shift
Bit shift.
Definition ngcbIFC.hpp:395
ngcb_chan_ip_t ip
RTMS channel IP configuration.
Definition ngcbIFC.hpp:401
ngcb_chan_rtms_t rtms
RTMS channel RTMS configuration.
Definition ngcbIFC.hpp:407
int src[4]
Enabled sources (0|1)
Definition ngcbIFC.hpp:398
Definition ngcbIFC.hpp:446
ngcb_rtms_chan chan[4]
RTMS channel configurations.
Definition ngcbIFC.hpp:448
ngcb_rtms_net net
RTMS network configuration.
Definition ngcbIFC.hpp:451
ngcb_rtms_if()
Constructor.
Definition ngcbIFC.hpp:454
Definition ngcbIFC.hpp:420
int ttl
IP time-to-live field.
Definition ngcbIFC.hpp:434
ngcb_rtms_net()
Constructor.
Definition ngcbIFC.hpp:440
int port
Source port.
Definition ngcbIFC.hpp:431
int ip
Local IP address.
Definition ngcbIFC.hpp:422
int subnet
Subnet mask.
Definition ngcbIFC.hpp:425
int gateway
Gateway.
Definition ngcbIFC.hpp:428
int ds
IP differentiated service field.
Definition ngcbIFC.hpp:437
Definition ngcbIFC.hpp:497
int dvld
SYNC with DataValid.
Definition ngcbIFC.hpp:505
ngcb_sctl_t()
Constructor.
Definition ngcbIFC.hpp:508
int size
Packet size.
Definition ngcbIFC.hpp:502
int fwd
Forward sync signal.
Definition ngcbIFC.hpp:499
Definition ngcbIFC.hpp:460
uint64_t start_sec
Schduled start time (seconds)
Definition ngcbIFC.hpp:468
uint64_t start_nsec
Scheduled start time (fractional nanoseconds)
Definition ngcbIFC.hpp:471
uint64_t period_sec
Schduled period (seconds)
Definition ngcbIFC.hpp:474
uint64_t sec
Current time (seconds)
Definition ngcbIFC.hpp:462
ngcb_tsu_t()
Constructor.
Definition ngcbIFC.hpp:486
uint64_t nsec
Current time (fractional nanoseconds)
Definition ngcbIFC.hpp:465
int status
Current TSU trigger status (read-back)
Definition ngcbIFC.hpp:483
uint64_t period_nsec
Scheduled period (fractional nanoseconds)
Definition ngcbIFC.hpp:477
int nshot
Number of trigger pulses (-1 = infinite)
Definition ngcbIFC.hpp:480