ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbIFC2 Class Reference

#include <ngcbIFC2.hpp>

Inheritance diagram for ngcbIFC2:
ngcbIFC ngcbIFC3

Public Member Functions

 ngcbIFC2 ()
 Constructor without name.
 
 ngcbIFC2 (const char *name)
 Constructor with name.
 
virtual ~ngcbIFC2 ()
 Destructor.
 
int Fd ()
 Return device file descriptor.
 
int Sim (int level)
 Set simulation level.
 
int Open (const char *name)
 Open interface by name.
 
int Close ()
 Close interface.
 
void Keeper (int seconds)
 Set line keeper interval (seconds)
 
int Reset ()
 Reset device.
 
int Ping ()
 Ping device.
 
int Timeout (int seconds)
 Set timeout.
 
int SetTime (uint64_t sec, uint64_t nsec)
 Set device time (seconds and nanoseconds since UNIX epoch)
 
int RPC (int mod, int target, int req, void *payload, unsigned int size, unsigned int *status)
 RPC.
 
int ReadAddr (ngcb_route_t route, int addr, int *buffer, int size, int *result)
 Read from address.
 
int WriteAddr (ngcb_route_t route, int addr, const int *buffer, int size, int *result)
 Write to address.
 
int Status (int *devStatus)
 Get last communication status.
 
int Connect ()
 Connect through to device.
 
int Disconnect ()
 Disconnect from device.
 
int Connected ()
 Connected to device.
 
int TsuStartAt (uint64_t sec, uint64_t nsec)
 
int TsuStart ()
 Start TSU trigger immediately.
 
int TsuStop ()
 Stop TSU trigger.
 
int TsuTrigger ()
 Manual TSU trigger.
 
int TsuSnapshot ()
 Take TSU snapshot.
 
int TsuStatus (int *value)
 Get TSU status.
 
int TsuConfig (ngcb_tsu_t *cfg)
 Get TSU configuration.
 
int TsuRunning ()
 
void Lock ()
 Lock device access.
 
void Unlock ()
 Unlock device access.
 
int _ReadAddr (ngcb_route_t route, int addr, int *buffer, int size, int *result)
 Read from address.
 
int _WriteAddr (ngcb_route_t route, int addr, const int *buffer, int size, int *result)
 Write to address.
 
int _Ping (char *erms)
 Ping protocol.
 
- Public Member Functions inherited from ngcbIFC
 ngcbIFC ()
 Constructor without device name.
 
 ngcbIFC (const char *name)
 Constructor with device name.
 
virtual ~ngcbIFC ()
 Destructor.
 
char * ErrMsg ()
 Pointer to last error message.
 
void ErrState (const char *msg, int errorId=0, void *origin=NULL)
 Go to error state with error message.
 
void Result2Err (char *s, int resultCode)
 Convert result code to error string.
 
void Verbose (const char *format,...) __attribute__((format(printf
 Verbose message.
 
void void Log (const char *format,...) __attribute__((format(printf
 Log message.
 
void void const char * SofwVersion ()
 Software version.
 
char * Name ()
 Device name.
 
char * Type ()
 Interface type.
 
char * Arg ()
 Driver interface process arguments.
 
int Instance ()
 Get interface instance.
 
void Instance (int instance)
 Set interface instance.
 
int Open ()
 Open interface with current name.
 
void DefaultTimeout (int seconds)
 Set default timeout.
 
int SetTime (double time=0.0)
 Set device time (seconds since UNIX epoch, time <= 0.0 sets system time).
 
int BigEndian ()
 Get endianess.
 
int SyncFwd (int flag)
 Forward SYNC signal.
 
int SyncWithData (int flag)
 SYNC with data-valid.
 
int SyncSize (int size)
 Set SYNC packet size.
 
int Configure (const char *s)
 Configure interface device via interface setup identification string.
 
int Configure ()
 Configure interface according to give device setup.
 
const char * Setup ()
 Return actual interface setup identification string.
 
int Standby ()
 Bring interface to STANDBY state.
 
int Online ()
 Bring interface to ONLINE state.
 
int Off ()
 Bring interface to OFF state.
 
int PythonTask (const char *script)
 Execute Python task.
 
int ReadAddr (const ngcb_route_t &route, int addr, int *buffer, int size)
 Read from address.
 
int WriteAddr (const ngcb_route_t &route, int addr, const int *buffer, int size)
 Write to address.
 
int WriteBuffer (const int *buffer, int size, int *result)
 Write formatted buffer to device.
 
int Event (ngcbEVT *evt)
 Activate device event.
 
int ReadAddr (int addr, int *buffer, int size=1)
 Read buffer from first board.
 
int WriteAddr (int addr, const int *buffer, int size)
 Write buffer to first board.
 
int WriteAddr (int addr, int value)
 Write to register on first board.
 
int ReadAddr64 (const ngcb_route_t &route, int addr, uint64_t *buffer, int size)
 64-bit read
 
int WriteAddr64 (const ngcb_route_t &route, int addr, const uint64_t *buffer, int size)
 64-bit write
 
int ReadAddr64 (int addr, uint64_t *buffer, int size=1)
 Read 64-bit buffer from first board.
 
int WriteAddr64 (int addr, const uint64_t *buffer, int size)
 Write 64-bit buffer to first board.
 
int WriteAddr64 (int addr, uint64_t value)
 Write to 64-bit register on first board.
 
int CheckEvent (ngcbEVT *evt, int *result)
 Check if device event conditions are met.
 
int Wait (ngcbEVT *evt, int interval, int *result)
 Wait for event.
 
void Poll ()
 Poll event list.
 
int SetChanIp (int idx, ngcb_chan_ip_t ip)
 Set RTMS channel IP configuration.
 
int SetChanMudpi (int idx, ngcb_chan_mudpi_t mudpi)
 Set RTMS channel MUDPI configuration.
 
int SetChanRtms (int idx, ngcb_chan_rtms_t rtms)
 Set RTMS channel RTMS configuration.
 
int SetRtmsNet (ngcb_rtms_net net)
 Set RTMS common parameters.
 
int GetChanIp (int idx, ngcb_chan_ip_t *ip)
 Get RTMS channel IP configuration.
 
int GetChanMudpi (int idx, ngcb_chan_mudpi_t *mudpi)
 Get RTMS channel MUDPI configuration.
 
int GetChanRtms (int idx, ngcb_chan_rtms_t *rtms)
 Get RTMS channel RTMS configuration.
 
int GetRtmsNet (ngcb_rtms_net *net)
 Get RTMS common parameters.
 
int SetChanEnable (int idx, int flag)
 Enable/disable RTMS channel.
 
int GetChanEnable (int idx, int *flag)
 Get RTMS channel status (enabled/disabled)
 
int SetChanSrc (int idx, int src=0, int flag=-1)
 Enable/disable channel source.
 
int GetChanSrc (int idx, int src, int *flag)
 Get enabled-flag per source and channel.
 
int GetChanDrop (int idx, int src, int *flag)
 Get channel source drop flag.
 
int ClearChanDrop (int idx)
 Clear channel drop flags.
 
int SetChanBits (int idx, int bits)
 Set number of enabled bits on channel.
 
int GetChanBits (int idx, int *bits)
 Get number of enabled bits on channel.
 
int SetChanShift (int idx, int shift)
 Set channel bit shift.
 
int GetChanShift (int idx, int *shift)
 Get channel bit shift.
 
virtual int Pid ()
 Driver interface process id.
 
virtual int Port ()
 Driver interface process command port.
 
virtual const char * Host ()
 Driver interface process host.
 
virtual int Timeout ()
 Get timeout.
 
virtual void RpcCopy (void *dest, const void *src, size_t size, size_t items)
 Copy RPC payload.
 
virtual int Str2Payload (const char *cmd, unsigned char *payload, unsigned int max, char *erms)
 Parse string to RPC payload.
 
virtual int Read (int *buffer, int size)
 Read buffer from device.
 
virtual int Write (const int *buffer, int size)
 Write buffer to device.
 
virtual int Event (ngcbEVT *evt, int *result)
 Activate device event.
 
virtual int ExecServer ()
 Launch driver interface process.
 
virtual int KillServer ()
 Terminate driver interface process.
 
virtual int Running ()
 Driver interface process is running.
 
virtual int HandleFdEvt ()
 Handle event on file descriptor.
 
virtual ClientConnection * GetConnection ()
 Get client connection.
 

Public Attributes

int fdPipe [2]
 Timer thread pipe.
 
char keeperMsg [256]
 Line keeper error message.
 
int keeperFailure
 Line keeper failure flag.
 
- Public Attributes inherited from ngcbIFC
FILE * watchdog
 External watchdog stream.
 
ngcbSERVICEservices
 System services.
 
int ioError
 Indicates an i/o error.
 
int local
 Interface is local.
 
char thisHost [64]
 Host where this instance is launched.
 
int netTimeout
 Network timeout (seconds)
 
int keeper
 Line keeper interval (seconds)
 
int sideLink
 Connected through sidelink.
 
int backPlane
 Back-plane id.
 
int master
 Index of master device.
 
int skip
 Number of route nodes to skip.
 
int chain
 Chain length from last skipped node to DFE.
 
ngcb_route_t cfgRoute
 Configuration route.
 
int serNo1
 Interface board serial number part one.
 
int serNo2
 Interface board serial number part two.
 
int id
 ID-register content.
 
int type
 Board type.
 
int version
 Board version (sub-type)
 
int revision
 Hardware revision.
 
int firmware
 Firmware revision.
 
int protocol
 Incremental protovol id.
 
ngcb_sctl_t sync
 SYNC signal control.
 
ngcb_rtms_cfg_t rtms
 RTMS configuration (WFS)
 
ngcb_rtms_if rtmsIf
 RTMS interface (NGCII)
 
ngcb_tsu_t tsu
 TSU configuration.
 
int tsuCtrl
 Enable/disable automatic start/stop of the TSU.
 
int sim
 Interface simulation level.
 
int xterm
 Start in new terminal.
 
int verboseLevel
 Verbose level.
 
int logLevel
 Logging level.
 
int translate
 RPC payload translation method.
 
ngcbLIST evtList
 Device event list.
 

Additional Inherited Members

- Protected Member Functions inherited from ngcbIFC
virtual int SetupCB (const char *buffer)
 Setup call-back.
 

Detailed Description

NGCII interface class

Constructor & Destructor Documentation

◆ ngcbIFC2() [1/2]

ngcbIFC2::ngcbIFC2 ( )

Constructor without name.

◆ ngcbIFC2() [2/2]

ngcbIFC2::ngcbIFC2 ( const char * name)
explicit

Constructor with name.

◆ ~ngcbIFC2()

ngcbIFC2::~ngcbIFC2 ( )
virtual

Destructor.

Member Function Documentation

◆ _Ping()

int ngcbIFC2::_Ping ( char * erms)

Ping protocol.

◆ _ReadAddr()

int ngcbIFC2::_ReadAddr ( ngcb_route_t route,
int addr,
int * buffer,
int size,
int * result )
virtual

Read from address.

Reimplemented from ngcbIFC.

◆ _WriteAddr()

int ngcbIFC2::_WriteAddr ( ngcb_route_t route,
int addr,
const int * buffer,
int size,
int * result )
virtual

Write to address.

Reimplemented from ngcbIFC.

◆ Close()

int ngcbIFC2::Close ( )
virtual

Close interface.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ Connect()

int ngcbIFC2::Connect ( )
virtual

Connect through to device.

Reimplemented from ngcbIFC.

◆ Connected()

int ngcbIFC2::Connected ( )
virtual

Connected to device.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ Disconnect()

int ngcbIFC2::Disconnect ( )
virtual

Disconnect from device.

Reimplemented from ngcbIFC.

◆ Fd()

int ngcbIFC2::Fd ( )
virtual

Return device file descriptor.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ Keeper()

void ngcbIFC2::Keeper ( int seconds)
virtual

Set line keeper interval (seconds)

Reimplemented from ngcbIFC.

◆ Lock()

void ngcbIFC2::Lock ( )

Lock device access.

◆ Open()

int ngcbIFC2::Open ( const char * name)
virtual

Open interface by name.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ Ping()

int ngcbIFC2::Ping ( )
virtual

Ping device.

Reimplemented from ngcbIFC.

◆ ReadAddr()

int ngcbIFC2::ReadAddr ( ngcb_route_t route,
int addr,
int * buffer,
int size,
int * result )
virtual

Read from address.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ Reset()

int ngcbIFC2::Reset ( )
virtual

Reset device.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ RPC()

int ngcbIFC2::RPC ( int mod,
int target,
int req,
void * payload,
unsigned int size,
unsigned int * status )
virtual

RPC.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ SetTime()

int ngcbIFC2::SetTime ( uint64_t sec,
uint64_t nsec )
virtual

Set device time (seconds and nanoseconds since UNIX epoch)

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ Sim()

int ngcbIFC2::Sim ( int level)
virtual

Set simulation level.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ Status()

int ngcbIFC2::Status ( int * devStatus)
virtual

Get last communication status.

Reimplemented from ngcbIFC.

◆ Timeout()

int ngcbIFC2::Timeout ( int seconds)
virtual

Set timeout.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

◆ TsuConfig()

int ngcbIFC2::TsuConfig ( ngcb_tsu_t * cfg)
virtual

Get TSU configuration.

Reimplemented from ngcbIFC.

◆ TsuRunning()

int ngcbIFC2::TsuRunning ( )
virtual

Reimplemented from ngcbIFC.

◆ TsuSnapshot()

int ngcbIFC2::TsuSnapshot ( )
virtual

Take TSU snapshot.

Reimplemented from ngcbIFC.

◆ TsuStart()

int ngcbIFC2::TsuStart ( )
virtual

Start TSU trigger immediately.

Reimplemented from ngcbIFC.

◆ TsuStartAt()

int ngcbIFC2::TsuStartAt ( uint64_t sec,
uint64_t nsec )
virtual

Reimplemented from ngcbIFC.

◆ TsuStatus()

int ngcbIFC2::TsuStatus ( int * value)
virtual

Get TSU status.

Reimplemented from ngcbIFC.

◆ TsuStop()

int ngcbIFC2::TsuStop ( )
virtual

Stop TSU trigger.

Reimplemented from ngcbIFC.

◆ TsuTrigger()

int ngcbIFC2::TsuTrigger ( )
virtual

Manual TSU trigger.

Reimplemented from ngcbIFC.

◆ Unlock()

void ngcbIFC2::Unlock ( )

Unlock device access.

◆ WriteAddr()

int ngcbIFC2::WriteAddr ( ngcb_route_t route,
int addr,
const int * buffer,
int size,
int * result )
virtual

Write to address.

Reimplemented from ngcbIFC.

Reimplemented in ngcbIFC3.

Member Data Documentation

◆ fdPipe

int ngcbIFC2::fdPipe[2]

Timer thread pipe.

◆ keeperFailure

int ngcbIFC2::keeperFailure

Line keeper failure flag.

◆ keeperMsg

char ngcbIFC2::keeperMsg[256]

Line keeper error message.


The documentation for this class was generated from the following files: