KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wrx.h File Reference

WhiteRabbit exchange exchanges information between the 2nd LM32 and WhiteRabbit though a small client in the whiteRabbit code-base. More...

#include "wrx_proto.h"
#include <stdbool.h>
#include <stdint.h>
#include <errorcode.h>

Go to the source code of this file.

Macros

#define E_WRX_EP_VER   ( E_WRX + 1 )
 
#define E_WRX_EP_VER_DESCR   "Remote WRX version does not match"
 

Functions

bool wrxInit ()
 Initializes the whiteRabbit eXchange. More...
 
bool wrxUp ()
 Returns whether or not the WhiteRabbit interface is up and running. More...
 
volatile WrxInfo * wrxInfo ()
 Returns the whiteRabbit information structure if available, else NULL. More...
 
bool wrxCmdPending ()
 Returns whether or not there is a command still pending to be executed. More...
 
uint64_t wrxUtcTime ()
 Returns the UTC time, or 0 if not available.
 
bool wrxSetAutoNeg (bool on)
 Returns autonegotation on or off. More...
 
bool wrxSetTuneWord (int32_t tuneWord)
 Sets the tune-word. More...
 
bool wrxGetTuneInfo (WrxTuneInfo *info)
 Sets the fields of the WrxTuneInfo structure. More...
 
bool wrxGetSFPSerialNo (char sn[17])
 Gets the sfp serial number. More...
 
bool wrxSetSFPThreshold (int index, uint16_t value)
 

Detailed Description

WhiteRabbit exchange exchanges information between the 2nd LM32 and WhiteRabbit though a small client in the whiteRabbit code-base.

Commands can be send between the 2nd LM32 and WhiteRabbit.

Definition in file wrx.h.

Function Documentation

bool wrxCmdPending ( )

Returns whether or not there is a command still pending to be executed.

Return values
trueYes
falseNo

Definition at line 70 of file wrx.c.

bool wrxGetSFPSerialNo ( char  sn[17])

Gets the sfp serial number.

Makes string zero terminated by setting sn[16]='\0'

Return values
falseCommand failed, check error module for more information
trueCommand successful

Definition at line 142 of file wrx.c.

bool wrxGetTuneInfo ( WrxTuneInfo *  info)

Sets the fields of the WrxTuneInfo structure.

Return values
falseCommand failed, check error module for more information
trueCommand successful

Definition at line 128 of file wrx.c.

volatile WrxInfo* wrxInfo ( )

Returns the whiteRabbit information structure if available, else NULL.

Returns
WhiteRabbit information, or NULL is not available.

Definition at line 63 of file wrx.c.

bool wrxInit ( )

Initializes the whiteRabbit eXchange.

Return values
trueInitialization succesful.
falseInitialization failed, check errCode() for more info.

Definition at line 34 of file wrx.c.

bool wrxSetAutoNeg ( bool  on)

Returns autonegotation on or off.

Parameters
onTurn it on.
Return values
falseCommand failed, check error module for more information
trueCommand successful

Definition at line 95 of file wrx.c.

bool wrxSetTuneWord ( int32_t  tuneWord)

Sets the tune-word.

Depends on the tuning procedure.

Return values
falseCommand failed, check error module for more information
trueCommand successful

Definition at line 117 of file wrx.c.

bool wrxUp ( )

Returns whether or not the WhiteRabbit interface is up and running.

Return values
trueIts up and running
falseIts not up and running.

Definition at line 58 of file wrx.c.