32
API-FDX Linux Getting Started Manual
GmbH
Section 8 – Programming the API-FDX Module
8.1.8. Setting up a Chronological Monitor Receiver
void MyFdxSetupRxPort()
{
TY_FDX_RX_MODE_CTRL_IN x_ModeCtrlIn;
TY_FDX_RX_MODE_CTRL_OUT x_ModeCtrlOut;
TY_FDX_MON_CAP_MODE x_MonCapMode;
TY_FDX_MON_QUEUE_CTRL_IN x_QueueCtrlIn;
TY_FDX_MON_QUEUE_CTRL_OUT x_QueueCtrlOut;
//--- mode control -> select Chrono Mode
x_ModeCtrlIn.ul_ReceiveMode = FDX_RX_CHRONO;
x_ModeCtrlIn.ul_DefaultPayloadMode = FDX_PAYLOAD_FULL;
x_ModeCtrlIn.ul_DefaultCronoMode = FDX_RX_DEFAULT_MON_ENA_ALL;
x_ModeCtrlIn.ul_GlbMonBufferSize = 0;
FdxCmdRxModeControl(g_ulPort2Handle, &x_ModeCtrlIn, &x_ModeCtrlOut);
//--- Monitor Capture Control
x_MonCapMode.ul_CaptureMode = FDX_MON_CONTINUOUS;
x_MonCapMode.ul_Strobe = FDX_MON_STROBE_DIS;
FdxCmdMonCaptureControl(g_ulPort2Handle, &x_MonCapMode);
//--- Create Monitor Queue
x_QueueCtrlIn.ul_QueueControl = FDX_MON_QUEUE_CREATE;
FdxCmdMonQueueControl(g_ulPort2Handle,
&x_QueueCtrlIn,
&x_QueueCtrlOut);
}