13#error This is a C++ include file and cannot be used from plain C
24#include <cmdsrv-client/client_connection.hpp>
26#define ClientConnection int
32#define ngcbIFC_TIMEOUT_DEFAULT 5
37#define ngcbIFC_CLASS_VERSION 0x00000001
42#define ngcbIFC_OP_WR 0x0
43#define ngcbIFC_OP_RD 0x1
44#define ngcbIFC_OP_EVT 0x2
49#define ngcbEVT_PENDING -1
50#define ngcbEVT_SUCCESS 0
51#define ngcbEVT_TIMEOUT 1
52#define ngcbEVT_FAILURE 2
53#define ngcbEVT_INVALID 3
54#define ngcbEVT_COND_FAIL 0x00010000
59#define RPC_STATE_INVALID 0x00000000
60#define RPC_STATE_SEND 0x00000001
61#define RPC_STATE_RECEIVED 0x00000002
62#define RPC_STATE_WAITING 0x00000003
63#define RPC_STATE_DONE 0x000000FF
64#define RPC_STATE_BUSY 0x40000000
65#define RPC_STATE_ERROR 0x80000000
66#define RPC_STATE_ERROR_UNKNOWN_CMD (RPC_STATE_ERROR | 1)
67#define RPC_STATE_ERROR_BUSY (RPC_STATE_ERROR | 2)
68#define RPC_STATE_ERROR_OUT_OF_MEMORY (RPC_STATE_ERROR | 3)
69#define RPC_STATE_ERROR_TOO_LONG (RPC_STATE_ERROR | 4)
70#define RPC_STATE_ERROR_UNKNOWN_DEVICE (RPC_STATE_ERROR | 5)
71#define RPC_STATE_ERROR_BUFFER_TOO_SMALL (RPC_STATE_ERROR | 6)
72#define RPC_STATE_ERROR_UNKNOWN_CHANNEL (RPC_STATE_ERROR | 7)
73#define RPC_STATE_ERROR_TRANSFER_FAILED (RPC_STATE_ERROR | 8)
103 if (board < 1) board = 1;
105 for (i=0;i<(board - 1);i++)
hdr[i] = 0x5;
117 for (i=0;i<
numHdr;i++)
if (
hdr[i] != other.
hdr[i])
return (
false);
165 if (i > 0) sprintf(tmp,
",%d",
hdr[i]);
166 else sprintf(tmp,
"%d",
hdr[i]);
187 void Setup(
int v) {value_ = v; setup_ = 1;}
258 if (!(
reg[i] == other.
reg[i]))
562 int x = value &
mask;
563 int c =
cond & 0xffff;
694 void Add(
int board,
int addr,
int mask,
int reference,
int cnd = 1) {
695 if ((n_ < size_) && (board > 0) && (board <=
ngcbMAX_MOD))
706 Add(r.
Board(), addr, mask, reference, cnd);
749 struct timeval timeStamp_;
755#define ngcbIFC_HDR_SIZE (3 + ngcbMAX_MOD + 1)
766 explicit ngcbIFC(
const char *name);
872 void ErrState(
const char *msg,
int errorId = 0,
void *origin = NULL);
878 void Verbose(
const char *format, ...)
879 __attribute__ ((format(printf, 2, 3)));
882 void Log(const
char *format, ...)
883 __attribute__ ((format(printf, 2, 3)));
915 int SetTime(
double time = 0.0);
967 int WriteBuffer(const
int *buffer,
int size,
int *result);
973 int ReadAddr(
int addr,
int *buffer,
int size = 1);
976 int WriteAddr(
int addr, const
int *buffer,
int size);
990 int ReadAddr64(
int addr, uint64_t *buffer,
int size = 1);
993 int WriteAddr64(
int addr, const uint64_t *buffer,
int size);
1010 int Wait(
ngcbEVT *evt,
int interval,
int *result);
1046 int SetChanSrc(
int idx,
int src = 0,
int flag = -1);
1084 virtual const
char *
Host();
1087 virtual
int Sim(
int level);
1090 virtual
int Open(const
char *name);
1093 virtual
int Close();
1105 virtual
void Keeper(
int seconds);
1108 virtual
int Reset();
1111 virtual
int Timeout(
int seconds);
1117 virtual
int SetTime(uint64_t sec, uint64_t nsec);
1120 virtual
void RpcCopy(
void *dest, const
void *src,
size_t size,
size_t items);
1123 virtual
int Str2Payload(const
char *cmd,
unsigned char *payload,
1124 unsigned int max,
char *erms);
1127 virtual
int RPC(
int mod,
int target,
int req,
void *payload,
1128 unsigned int size,
unsigned int *status);
1131 virtual
int Read(
int *buffer,
int size);
1134 virtual
int Write(const
int *buffer,
int size);
1142 int size,
int *result);
1148 virtual
int Status(
int *devStatus);
1172 virtual
int TsuStartAt(uint64_t sec, uint64_t nsec);
1210 int size,
int *result);
1214 virtual
int SetupCB(const
char *buffer);
1221 char thisVersion_[128];
1233 char setupString_[64];
1257 int testBuffer_[1024];
1278 int IfcRead_(
int addr);
1281 void IfcWrite_(
int addr,
int value);
1289 virtual
int ReadLocal_(
int addr,
int *value);
1292 virtual
int WriteLocal_(
int addr,
int value);
1295 virtual
int ReadCfg_(
int addr,
int *value);
1298 virtual
int WriteCfg_(
int addr,
int value);
1306 int ScaRead_(const
ngcb_route_t &route,
int addr,
int sid,
int flags,
1307 int *buffer,
int size,
int *result);
1310 int ScaWrite_(const
ngcb_route_t &route,
int addr,
int sid,
int flags,
1311 const
int *buffer,
int size,
int *result);
1314 int ScaReadBlock_(const
ngcb_route_t &route,
int addr,
int sid,
int flags,
1315 int *buffer,
int size,
int *result);
1318 int ScaWriteBlock_(const
ngcb_route_t &route,
int addr,
int sid,
int flags,
1319 const
int *buffer,
int size,
int *result);
1322 int ScaCRC16_(const
int *buffer,
int size);
1340 route_.numHdr = r.
numHdr;
1341 for (i=0;i<r.
numHdr;i++) route_.hdr[i] = r.
hdr[i];
1356 int OutCB(
int d,
int *resultCode,
char *erms) {
1362 if (dev_->verboseLevel > 1)
1366 dev_->Verbose(
"ngcbI2C: <%s>\n", s);
1375 strcpy(erms, dev_->ErrMsg());
1389 int InCB(
int *d,
int *resultCode,
char *erms) {
1401 strcpy(erms, dev_->ErrMsg());
1441 route_.numHdr = r.
numHdr;
1442 for (i=0;i<r.
numHdr;i++) route_.hdr[i] = r.
hdr[i];
1452 int OutCB(
int side,
int d,
int *resultCode,
char *erms) {
1465 if (dev_->verboseLevel > 1)
1469 dev_->Verbose(
"ngcbAFE: <%s> <0x%04x>\n", s, d & 0xffff);
1475 if (dev_->_WriteAddr(route_, addr, &d, 1,
1478 strcpy(erms, dev_->ErrMsg());
int tmo
Timeout for microsleep.
Definition ngcbIFC.hpp:1431
ngcbAFE_IO(ngcbIFC *dev, ngcb_route_t r)
Constructor.
Definition ngcbIFC.hpp:1434
int OutCB(int side, int d, int *resultCode, char *erms)
Write one word (call-back)
Definition ngcbIFC.hpp:1452
virtual ~ngcbAFE_IO()
Destructor.
Definition ngcbIFC.hpp:1448
ngcbAFE()
Constructor.
Definition ngcbAFE.hpp:26
Definition ngcbIFC.hpp:601
int id
Event id.
Definition ngcbIFC.hpp:604
int async
Asynchronous event notification.
Definition ngcbIFC.hpp:607
ngcb_evt_t * component
Device event components.
Definition ngcbIFC.hpp:619
void Add(const ngcb_evt_t &evt)
Add event component.
Definition ngcbIFC.hpp:691
ngcbEVT(size_t size)
Constructor.
Definition ngcbIFC.hpp:641
ngcbEVT & operator=(const ngcbEVT &other)
Operator =.
Definition ngcbIFC.hpp:665
void TimeStamp()
Event timestamp.
Definition ngcbIFC.hpp:710
int done
Done.
Definition ngcbIFC.hpp:616
virtual ~ngcbEVT()
Destructor.
Definition ngcbIFC.hpp:657
size_t Size()
Return number of list components.
Definition ngcbIFC.hpp:688
int timeout
Timeout (seconds)
Definition ngcbIFC.hpp:613
ngcbEVT(const ngcbEVT &other)
Copy constructor.
Definition ngcbIFC.hpp:622
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:704
int Timeout()
Check for timeout.
Definition ngcbIFC.hpp:713
int cond
Event condition: 0 = any, 1 = all (default)
Definition ngcbIFC.hpp:610
void Add(int board, int addr, int mask, int reference, int cnd=1)
Add explicit event (on board)
Definition ngcbIFC.hpp:694
int OutCB(int d, int *resultCode, char *erms)
Write one word (call-back)
Definition ngcbIFC.hpp:1356
virtual ~ngcbI2C_IO()
Destructor.
Definition ngcbIFC.hpp:1349
int InCB(int *d, int *resultCode, char *erms)
Read one word (call-back)
Definition ngcbIFC.hpp:1389
int tmo
Timeout for microsleep.
Definition ngcbIFC.hpp:1353
ngcbI2C_IO(ngcbIFC *dev, ngcb_route_t r, int cnt)
Constructor.
Definition ngcbIFC.hpp:1332
ngcbI2C()
Definition ngcbI2C.hpp:44
void ACK_IN(int bit)
Define ack-line bit.
Definition ngcbI2C.hpp:100
void SDA_DIR_SWITCH(int bit)
Define SDA direction switch bit.
Definition ngcbI2C.hpp:103
Definition ngcbIFC.hpp:760
int SetChanSrc(int idx, int src=0, int flag=-1)
Enable/disable channel source.
Definition ngcbIFC.cpp:3652
virtual int Port()
Driver interface process command port.
Definition ngcbIFC.cpp:265
int protocol
Incremental protovol id.
Definition ngcbIFC.hpp:832
virtual int TsuStop()
Stop TSU trigger.
Definition ngcbIFC.cpp:2096
int backPlane
Back-plane id.
Definition ngcbIFC.hpp:796
int GetChanMudpi(int idx, ngcb_chan_mudpi_t *mudpi)
Get RTMS channel MUDPI configuration.
Definition ngcbIFC.cpp:3508
void ErrState(const char *msg, int errorId=0, void *origin=NULL)
Go to error state with error message.
Definition ngcbIFC.cpp:2166
char * Type()
Interface type.
Definition ngcbIFC.cpp:233
virtual int TsuRunning()
Definition ngcbIFC.cpp:2100
virtual int Reset()
Reset device.
Definition ngcbIFC.cpp:539
virtual ~ngcbIFC()
Destructor.
Definition ngcbIFC.cpp:47
int serNo2
Interface board serial number part two.
Definition ngcbIFC.hpp:814
void Result2Err(char *s, int resultCode)
Convert result code to error string.
Definition ngcbIFC.cpp:2184
char * Name()
Device name.
Definition ngcbIFC.cpp:231
virtual int Read(int *buffer, int size)
Read buffer from device.
Definition ngcbIFC.cpp:685
FILE * watchdog
External watchdog stream.
Definition ngcbIFC.hpp:772
void Verbose(const char *format,...) __attribute__((format(printf
Verbose message.
Definition ngcbIFC.cpp:2103
int xterm
Start in new terminal.
Definition ngcbIFC.hpp:853
int tsuCtrl
Enable/disable automatic start/stop of the TSU.
Definition ngcbIFC.hpp:847
int SetChanBits(int idx, int bits)
Set number of enabled bits on channel.
Definition ngcbIFC.cpp:3780
int translate
RPC payload translation method.
Definition ngcbIFC.hpp:862
int SyncFwd(int flag)
Forward SYNC signal.
Definition ngcbIFC.cpp:2295
int skip
Number of route nodes to skip.
Definition ngcbIFC.hpp:802
int version
Board version (sub-type)
Definition ngcbIFC.hpp:823
virtual int Pid()
Driver interface process id.
Definition ngcbIFC.cpp:256
virtual int Close()
Close interface.
Definition ngcbIFC.cpp:464
virtual int _WriteAddr(ngcb_route_t route, int addr, const int *buffer, int size, int *result)
Write to adress.
Definition ngcbIFC.cpp:1402
int Event(ngcbEVT *evt)
Activate device event.
Definition ngcbIFC.cpp:1961
ngcbSERVICE * services
System services.
Definition ngcbIFC.hpp:775
int SetRtmsNet(ngcb_rtms_net net)
Set RTMS common parameters.
Definition ngcbIFC.cpp:3451
int GetChanRtms(int idx, ngcb_chan_rtms_t *rtms)
Get RTMS channel RTMS configuration.
Definition ngcbIFC.cpp:3542
int GetChanDrop(int idx, int src, int *flag)
Get channel source drop flag.
Definition ngcbIFC.cpp:3725
int sideLink
Connected through sidelink.
Definition ngcbIFC.hpp:793
int Instance()
Get interface instance.
Definition ngcbIFC.cpp:237
virtual int Connect()
Connect through to device.
Definition ngcbIFC.cpp:507
virtual int TsuSnapshot()
Take TSU snapshot.
Definition ngcbIFC.cpp:2101
void DefaultTimeout(int seconds)
Set default timeout.
Definition ngcbIFC.cpp:621
virtual int _ReadAddr(ngcb_route_t route, int addr, int *buffer, int size, int *result)
Read from address.
Definition ngcbIFC.cpp:1251
void void const char * SofwVersion()
Software version.
Definition ngcbIFC.cpp:229
int id
ID-register content.
Definition ngcbIFC.hpp:817
char * Arg()
Driver interface process arguments.
Definition ngcbIFC.cpp:235
char thisHost[64]
Host where this instance is launched.
Definition ngcbIFC.hpp:784
int GetChanSrc(int idx, int src, int *flag)
Get enabled-flag per source and channel.
Definition ngcbIFC.cpp:3693
virtual int Write(const int *buffer, int size)
Write buffer to device.
Definition ngcbIFC.cpp:733
int WriteAddr64(const ngcb_route_t &route, int addr, const uint64_t *buffer, int size)
64-bit write
Definition ngcbIFC.cpp:1607
int ReadAddr64(const ngcb_route_t &route, int addr, uint64_t *buffer, int size)
64-bit read
Definition ngcbIFC.cpp:1601
int SetChanMudpi(int idx, ngcb_chan_mudpi_t mudpi)
Set RTMS channel MUDPI configuration.
Definition ngcbIFC.cpp:3396
virtual int RPC(int mod, int target, int req, void *payload, unsigned int size, unsigned int *status)
RPC.
Definition ngcbIFC.cpp:677
virtual ClientConnection * GetConnection()
Get client connection.
Definition ngcbIFC.cpp:3969
int Online()
Bring interface to ONLINE state.
Definition ngcbIFC.cpp:2492
char * ErrMsg()
Pointer to last error message.
Definition ngcbIFC.cpp:2158
int verboseLevel
Verbose level.
Definition ngcbIFC.hpp:856
virtual int SetupCB(const char *buffer)
Setup call-back.
Definition ngcbIFC.cpp:660
int SyncSize(int size)
Set SYNC packet size.
Definition ngcbIFC.cpp:2315
void void Log(const char *format,...) __attribute__((format(printf
Log message.
Definition ngcbIFC.cpp:2139
virtual int Ping()
Ping device.
Definition ngcbIFC.cpp:535
virtual const char * Host()
Driver interface process host.
Definition ngcbIFC.cpp:274
int firmware
Firmware revision.
Definition ngcbIFC.hpp:829
int SyncWithData(int flag)
SYNC with data-valid.
Definition ngcbIFC.cpp:2275
void Poll()
Poll event list.
Definition ngcbIFC.cpp:1973
int ioError
Indicates an i/o error.
Definition ngcbIFC.hpp:778
int ClearChanDrop(int idx)
Clear channel drop flags.
Definition ngcbIFC.cpp:3757
int GetRtmsNet(ngcb_rtms_net *net)
Get RTMS common parameters.
Definition ngcbIFC.cpp:3571
virtual int Str2Payload(const char *cmd, unsigned char *payload, unsigned int max, char *erms)
Parse string to RPC payload.
Definition ngcbIFC.cpp:671
int SetChanShift(int idx, int shift)
Set channel bit shift.
Definition ngcbIFC.cpp:3834
ngcb_sctl_t sync
SYNC signal control.
Definition ngcbIFC.hpp:835
int master
Index of master device.
Definition ngcbIFC.hpp:799
int GetChanBits(int idx, int *bits)
Get number of enabled bits on channel.
Definition ngcbIFC.cpp:3805
int GetChanShift(int idx, int *shift)
Get channel bit shift.
Definition ngcbIFC.cpp:3859
int local
Interface is local.
Definition ngcbIFC.hpp:781
virtual int Disconnect()
Disconnect from device.
Definition ngcbIFC.cpp:520
int Configure(const char *s)
Configure interface device via interface setup identification string.
Definition ngcbIFC.cpp:2336
int type
Board type.
Definition ngcbIFC.hpp:820
virtual void Keeper(int seconds)
Set line keeper interval (seconds)
Definition ngcbIFC.cpp:537
int Open()
Open interface with current name.
Definition ngcbIFC.cpp:319
virtual int TsuStartAt(uint64_t sec, uint64_t nsec)
Definition ngcbIFC.cpp:2090
virtual int KillServer()
Terminate driver interface process.
Definition ngcbIFC.cpp:2038
virtual int Connected()
Connected to device.
Definition ngcbIFC.cpp:2055
int serNo1
Interface board serial number part one.
Definition ngcbIFC.hpp:811
int revision
Hardware revision.
Definition ngcbIFC.hpp:826
int SetTime(double time=0.0)
Set device time (seconds since UNIX epoch, time <= 0.0 sets system time).
Definition ngcbIFC.cpp:629
int ReadAddr(const ngcb_route_t &route, int addr, int *buffer, int size)
Read from address.
Definition ngcbIFC.cpp:1544
int WriteBuffer(const int *buffer, int size, int *result)
Write formatted buffer to device.
Definition ngcbIFC.cpp:1644
int WriteAddr(const ngcb_route_t &route, int addr, const int *buffer, int size)
Write to address.
Definition ngcbIFC.cpp:1557
int keeper
Line keeper interval (seconds)
Definition ngcbIFC.hpp:790
int CheckEvent(ngcbEVT *evt, int *result)
Check if device event conditions are met.
Definition ngcbIFC.cpp:1731
virtual int Status(int *devStatus)
Get communication status.
Definition ngcbIFC.cpp:2009
ngcbLIST evtList
Device event list.
Definition ngcbIFC.hpp:1004
int Off()
Bring interface to OFF state.
Definition ngcbIFC.cpp:2644
int logLevel
Logging level.
Definition ngcbIFC.hpp:859
int BigEndian()
Get endianess.
Definition ngcbIFC.cpp:241
virtual int Running()
Driver interface process is running.
Definition ngcbIFC.cpp:2047
int GetChanIp(int idx, ngcb_chan_ip_t *ip)
Get RTMS channel IP configuration.
Definition ngcbIFC.cpp:3476
virtual int TsuConfig(ngcb_tsu_t *cfg)
Get TSU configuration.
Definition ngcbIFC.cpp:2099
int Standby()
Bring interface to STANDBY state.
Definition ngcbIFC.cpp:2458
virtual int HandleFdEvt()
Handle event on file descriptor.
Definition ngcbIFC.cpp:2064
ngcb_route_t cfgRoute
Configuration route.
Definition ngcbIFC.hpp:808
virtual int Sim(int level)
Set simulation level.
Definition ngcbIFC.cpp:283
int SetChanIp(int idx, ngcb_chan_ip_t ip)
Set RTMS channel IP configuration.
Definition ngcbIFC.cpp:3369
ngcb_rtms_cfg_t rtms
RTMS configuration (WFS)
Definition ngcbIFC.hpp:838
int SetChanRtms(int idx, ngcb_chan_rtms_t rtms)
Set RTMS channel RTMS configuration.
Definition ngcbIFC.cpp:3425
int SetChanEnable(int idx, int flag)
Enable/disable RTMS channel.
Definition ngcbIFC.cpp:3601
int netTimeout
Network timeout (seconds)
Definition ngcbIFC.hpp:787
virtual int ExecServer()
Launch driver interface process.
Definition ngcbIFC.cpp:2029
virtual void RpcCopy(void *dest, const void *src, size_t size, size_t items)
Copy RPC payload.
Definition ngcbIFC.cpp:666
int chain
Chain length from last skipped node to DFE.
Definition ngcbIFC.hpp:805
ngcb_rtms_if rtmsIf
RTMS interface (NGCII)
Definition ngcbIFC.hpp:841
int GetChanEnable(int idx, int *flag)
Get RTMS channel status (enabled/disabled)
Definition ngcbIFC.cpp:3625
const char * Setup()
Return actual interface setup identification string.
Definition ngcbIFC.cpp:2419
int sim
Interface simulation level.
Definition ngcbIFC.hpp:850
ngcbIFC()
Constructor without device name.
Definition ngcbIFC.cpp:36
virtual int TsuStatus(int *value)
Get TSU status.
Definition ngcbIFC.cpp:2098
ngcb_tsu_t tsu
TSU configuration.
Definition ngcbIFC.hpp:844
virtual int Timeout(int seconds)
Set timeout.
Definition ngcbIFC.cpp:597
virtual int Fd()
Return device file descriptor.
Definition ngcbIFC.cpp:247
virtual int TsuTrigger()
Manual TSU trigger.
Definition ngcbIFC.cpp:2097
int Wait(ngcbEVT *evt, int interval, int *result)
Wait for event.
Definition ngcbIFC.cpp:1868
int PythonTask(const char *script)
Execute Python task.
Definition ngcbIFC.cpp:3888
virtual int TsuStart()
Start TSU trigger immediatly.
Definition ngcbIFC.cpp:2095
Definition ngcbLIST.hpp:34
Definition ngcbSERVICE.hpp:36
Definition ngcbSIM.hpp:152
Definition ngcbIFC.hpp:172
void Setup(int v)
Set value.
Definition ngcbIFC.hpp:187
int addr
Address.
Definition ngcbIFC.hpp:175
int Value()
Constructor.
Definition ngcbIFC.hpp:184
int Setup()
Check, if value has been set.
Definition ngcbIFC.hpp:190
void Reset()
Reset.
Definition ngcbIFC.hpp:193
ngcb_reg_t()
Constructor.
Definition ngcbIFC.hpp:178
Definition ngcbIFC.hpp:206
ngcb_rtms_cfg_t & operator=(const ngcb_rtms_cfg_t &other)
Operator =.
Definition ngcbIFC.hpp:267
ngcb_reg_t dest_ip
RTC-IF destination ip.
Definition ngcbIFC.hpp:236
ngcb_reg_t ds
RTC-IF DS.
Definition ngcbIFC.hpp:248
ngcb_reg_t leadingPadding
RTMS leading padding.
Definition ngcbIFC.hpp:218
bool operator==(const ngcb_rtms_cfg_t &other) const
Operator ==.
Definition ngcbIFC.hpp:254
ngcb_reg_t littleEndian
RTMS little endian.
Definition ngcbIFC.hpp:224
ngcb_rtms_cfg_t()
Constructor.
Definition ngcbIFC.hpp:297
ngcb_reg_t ttl
RTC-IF TTL.
Definition ngcbIFC.hpp:245
ngcb_reg_t * reg[14]
Register array.
Definition ngcbIFC.hpp:251
ngcb_reg_t gateway
RTC-IF gatewway.
Definition ngcbIFC.hpp:233
ngcb_reg_t trailingPadding
RTMS trailing padding.
Definition ngcbIFC.hpp:221
ngcb_reg_t subnet
RTC-IF subnet mask.
Definition ngcbIFC.hpp:230
ngcb_reg_t srcPort
RTC-IF source port.
Definition ngcbIFC.hpp:239
ngcb_reg_t topic
MUDPI topic.
Definition ngcbIFC.hpp:209
ngcb_reg_t component
MUDPI component.
Definition ngcbIFC.hpp:212
ngcb_rtms_cfg_t(const ngcb_rtms_cfg_t &other)
Copy constructor.
Definition ngcbIFC.hpp:284
ngcb_reg_t application
MUDPI application.
Definition ngcbIFC.hpp:215
void Reset()
Reset all registers.
Definition ngcbIFC.hpp:302
ngcb_reg_t local_ip
RTC-IF local ip.
Definition ngcbIFC.hpp:227
ngcb_reg_t destPort
RTC-IF destination port.
Definition ngcbIFC.hpp:242
#define ngcbRES_SUCCESS
Definition ngcbAddr.h:633
#define ngcbSEQ_STAT_WAITING
Definition ngcbAddr.h:214
#define ngcbI2C_CLK_LINE
Definition ngcbAddr.h:492
#define ngcbI2C_DATA_LINE
Definition ngcbAddr.h:493
#define ngcbAO_ADDR_AFE_L
Definition ngcbAddr.h:530
#define ngcbAO_ADDR_AFE_R
Definition ngcbAddr.h:531
#define ngcbSEQ_STAT_RUNNING
Definition ngcbAddr.h:213
#define ngcbMAX_MOD
Definition ngcbAddr.h:628
#define ngcbI2C_PORT
Definition ngcbAddr.h:491
#define ngcbEVT_SUCCESS
Definition ngcbIFC.hpp:50
#define ngcbEVT_COND_FAIL
Definition ngcbIFC.hpp:54
#define ngcbDiffTime(t1, t2)
Definition ngcb.h:309
int ngcbMicroSleep(int fd, int waitTime)
Definition ngcbTime.c:291
void ngcbInt2Bin(char *str, int in)
Definition ngcbMath.c:92
int ngcbGetTime(struct timeval *t)
Definition ngcbTime.c:41
#define ngcbSUCCESS
Definition ngcb.h:138
#define _vecsize(x)
Definition ngcb.h:80
Definition ngcbIFC.hpp:345
ngcb_chan_ip_t()
Constructor.
Definition ngcbIFC.hpp:353
int port
Destination port.
Definition ngcbIFC.hpp:350
int ip
Destination ip address.
Definition ngcbIFC.hpp:347
Definition ngcbIFC.hpp:359
int application
MUDPI application tag.
Definition ngcbIFC.hpp:367
int topic
MUDPI topic.
Definition ngcbIFC.hpp:361
int component
MUDPI component.
Definition ngcbIFC.hpp:364
ngcb_chan_mudpi_t()
Constructor.
Definition ngcbIFC.hpp:370
Definition ngcbIFC.hpp:376
int le
RTMS little-endian.
Definition ngcbIFC.hpp:384
ngcb_chan_rtms_t()
Constructor.
Definition ngcbIFC.hpp:387
int trailingPadding
RTMS trailing padding.
Definition ngcbIFC.hpp:381
int leadingPadding
RTMS leading padding.
Definition ngcbIFC.hpp:378
ngcb_evt_st_t(int i, int s)
Full constructor.
Definition ngcbIFC.hpp:592
int status
Event status.
Definition ngcbIFC.hpp:586
int id
Event id.
Definition ngcbIFC.hpp:583
ngcb_evt_st_t(int i)
Success constructor for id.
Definition ngcbIFC.hpp:595
ngcb_evt_st_t()
Constructor.
Definition ngcbIFC.hpp:589
Definition ngcbIFC.hpp:520
int addr
Address.
Definition ngcbIFC.hpp:525
int Failure()
Check failure condition.
Definition ngcbIFC.hpp:569
ngcb_evt_t()
Constructor.
Definition ngcbIFC.hpp:553
int board
Board number (1, ...)
Definition ngcbIFC.hpp:522
int mask
32-bit mask
Definition ngcbIFC.hpp:528
ngcb_evt_t(const ngcb_evt_t &other)
Copy constructor.
Definition ngcbIFC.hpp:547
int reference
32-bit reference value
Definition ngcbIFC.hpp:531
ngcb_route_t Route()
Return route to board.
Definition ngcbIFC.hpp:572
int cond
Condition: 0 = match any, 1 = match all (default)
Definition ngcbIFC.hpp:534
ngcb_evt_t & operator=(const ngcb_evt_t &other)
Operator =.
Definition ngcbIFC.hpp:537
int Check(int value)
Check event status.
Definition ngcbIFC.hpp:561
ngcb_ifc_err(const ngcb_ifc_err &other)
Copy constructor.
Definition ngcbIFC.hpp:1518
void * origin
Definition ngcbIFC.hpp:1505
ngcb_ifc_err(void *o, ngcbIFC *d)
Fully classified constructor.
Definition ngcbIFC.hpp:1529
ngcb_ifc_err & operator=(const ngcb_ifc_err &other)
Operator =.
Definition ngcbIFC.hpp:1509
ngcb_ifc_err()
Constructor.
Definition ngcbIFC.hpp:1526
ngcbIFC * device
Definition ngcbIFC.hpp:1506
Definition ngcbIFC.hpp:78
int Board() const
Return board number.
Definition ngcbIFC.hpp:134
int Last() const
Return last routing instruction.
Definition ngcbIFC.hpp:146
bool operator==(const ngcb_route_t &other) const
Operator ==.
Definition ngcbIFC.hpp:112
int hdr[ngcbMAX_MOD]
Route instructions.
Definition ngcbIFC.hpp:83
void Print(char *s) const
Print route to string.
Definition ngcbIFC.hpp:158
ngcb_route_t & operator=(const ngcb_route_t &other)
Operator =.
Definition ngcbIFC.hpp:123
int numHdr
Number of headers in route.
Definition ngcbIFC.hpp:80
ngcb_route_t(const ngcb_route_t &other)
Copy constructor.
Definition ngcbIFC.hpp:86
ngcb_route_t(int board)
Constructor with board number.
Definition ngcbIFC.hpp:101
ngcb_route_t()
Constructor.
Definition ngcbIFC.hpp:94
Definition ngcbIFC.hpp:393
ngcb_rtms_chan()
Constructor.
Definition ngcbIFC.hpp:416
int bits
Number of bits per sample.
Definition ngcbIFC.hpp:398
int enable
Enable channel.
Definition ngcbIFC.hpp:395
ngcb_chan_mudpi_t mudpi
RTMS channel MUDPI configuration.
Definition ngcbIFC.hpp:410
int shift
Bit shift.
Definition ngcbIFC.hpp:401
ngcb_chan_ip_t ip
RTMS channel IP configuration.
Definition ngcbIFC.hpp:407
ngcb_chan_rtms_t rtms
RTMS channel RTMS configuration.
Definition ngcbIFC.hpp:413
int src[4]
Enabled sources (0|1)
Definition ngcbIFC.hpp:404
Definition ngcbIFC.hpp:452
ngcb_rtms_chan chan[4]
RTMS channel configurations.
Definition ngcbIFC.hpp:454
ngcb_rtms_net net
RTMS network configuration.
Definition ngcbIFC.hpp:457
ngcb_rtms_if()
Constructor.
Definition ngcbIFC.hpp:460
Definition ngcbIFC.hpp:426
int ttl
IP time-to-live field.
Definition ngcbIFC.hpp:440
ngcb_rtms_net()
Constructor.
Definition ngcbIFC.hpp:446
int port
Source port.
Definition ngcbIFC.hpp:437
int ip
Local IP address.
Definition ngcbIFC.hpp:428
int subnet
Subnet mask.
Definition ngcbIFC.hpp:431
int gateway
Gateway.
Definition ngcbIFC.hpp:434
int ds
IP differentiated service field.
Definition ngcbIFC.hpp:443
Definition ngcbIFC.hpp:503
int dvld
SYNC with DataValid.
Definition ngcbIFC.hpp:511
ngcb_sctl_t()
Constructor.
Definition ngcbIFC.hpp:514
int size
Packet size.
Definition ngcbIFC.hpp:508
int fwd
Forward sync signal.
Definition ngcbIFC.hpp:505
Definition ngcbIFC.hpp:466
uint64_t start_sec
Schduled start time (seconds)
Definition ngcbIFC.hpp:474
uint64_t start_nsec
Scheduled start time (fractional nanoseconds)
Definition ngcbIFC.hpp:477
uint64_t period_sec
Schduled period (seconds)
Definition ngcbIFC.hpp:480
uint64_t sec
Current time (seconds)
Definition ngcbIFC.hpp:468
ngcb_tsu_t()
Constructor.
Definition ngcbIFC.hpp:492
uint64_t nsec
Current time (fractional nanoseconds)
Definition ngcbIFC.hpp:471
int status
Current TSU trigger status (read-back)
Definition ngcbIFC.hpp:489
uint64_t period_nsec
Scheduled period (fractional nanoseconds)
Definition ngcbIFC.hpp:483
int nshot
Number of trigger pulses (-1 = infinite)
Definition ngcbIFC.hpp:486