OC192 Mezzanine Access Functions
[OCM/OC192 Library]


Detailed Description

Setup and diagnostic functions specific to OC192 mezzanine channels.


Functions

int edt_oc192_clear_demux (EdtDev *edt_p)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_demux_chan_enable (EdtDev *edt_p, int channel, int enable)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_demux_get (EdtDev *edt_p, EdtLineRate line_rate, u_char *onoff)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_demux_get_chan_enabled (EdtDev *edt_p, int channel)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_demux_set (EdtDev *edt_p, EdtLineRate line_rate, u_char *onoff)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_has_mezz_bitfile (EdtDev *edt_p, char *bitfile_name)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_load_default_mezzanine (EdtDev *edt_p, EdtLineRate line_rate, char *mezz_0, char *mezz_1)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_lock_clocks (EdtDev *edt_p, int timeout)
 
Parameters:
edt_p pointer to device structure

char * edt_oc192_mezz_filename (EdtDev *edt_p, EdtLineRate line_rate)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_set_clock_select (EdtDev *edt_p, EdtLineRate line_rate)
 
Parameters:
edt_p pointer to device structure

void edt_oc192_set_framer (EdtDev *edt_p, int flags)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_set_tagging (EdtDev *edt_p, int state, int tagid)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_speed_capable (EdtDev *edt_p, EdtLineRate line_rate)
 
Parameters:
edt_p pointer to device structure

int edt_oc192_wait_for_frame (EdtDev *edt_p, int timeout)
 
Parameters:
edt_p pointer to device structure


Function Documentation

int edt_oc192_clear_demux ( EdtDev edt_p  ) 

Parameters:
edt_p pointer to device structure

Returns:
0 on success
Clears OC192 demux registers

Definition at line 1678 of file lib_ocm.c.

int edt_oc192_demux_chan_enable ( EdtDev edt_p,
int  channel,
int  enable 
)

Parameters:
edt_p pointer to device structure

Parameters:
channel which channel to enable/disable
enable A value of 0 or 1 to indicate whether to enable this column in the input. 0 means off, 1 means enabled (this is the inverse of the actual bit state).
Returns:
0 on success, -1 on parameter error
Sets a bit in the demux registers to enable/disable a particular column in the input.

Definition at line 3153 of file lib_ocm.c.

int edt_oc192_demux_get ( EdtDev edt_p,
EdtLineRate  line_rate,
u_char *  onoff 
)

Parameters:
edt_p pointer to device structure

Parameters:
line_rate Line Rate constant - must be OC192_RATE or STM64_RATE
onoff An array of 0 or 1 to indicate whether column is active. (In the register the bits are actually the inverse of this.) The length of the array should be 192 for OC192
Returns:
0 on success, -1 on parameter error
Gets the bits in the demux registers to enable/disable a particular column in the input.

Definition at line 3109 of file lib_ocm.c.

int edt_oc192_demux_get_chan_enabled ( EdtDev edt_p,
int  channel 
)

Parameters:
edt_p pointer to device structure

Parameters:
channel which channel to return the enabled status
Returns:
0 if not enabled, 1 if enabled
Gets the bit in the demux registers that indicate whether a particular column in the input is enabled.

Definition at line 3194 of file lib_ocm.c.

int edt_oc192_demux_set ( EdtDev edt_p,
EdtLineRate  line_rate,
u_char *  onoff 
)

Parameters:
edt_p pointer to device structure

Parameters:
line_rate Line Rate constant
onoff An array of 0 or 1 to indicate whether column is active. (In the register the bits are actually the inverse of this.) The length of the array shouldhe length of the array should be 192 for OC192.
Returns:
0 on success, -1 on framing timeout
Sets the bits in the demux registers to enable/disable a particular column in the input.

Definition at line 3059 of file lib_ocm.c.

int edt_oc192_has_mezz_bitfile ( EdtDev edt_p,
char *  bitfile_name 
)

Parameters:
edt_p pointer to device structure

Parameters:
bitfile_name Desired bitfile name
Returns:
0 if the bitfile matches current one, non-zero otherwise
Compares bitfile_name to the currently loaded bitfile

Definition at line 1579 of file lib_ocm.c.

int edt_oc192_load_default_mezzanine ( EdtDev edt_p,
EdtLineRate  line_rate,
char *  mezz_0,
char *  mezz_1 
)

Parameters:
edt_p pointer to device structure

Parameters:
line_rate rate constant for the channel. If 0 use default OC192_RATE
mezz_0 Optional alternate mezzanine bitfile name. Defaults to OC192
mezz_1 Ignored
Returns:
0 on success
Loads OC192 unless overriden by parameters. Equivalent to the command line "otuload"

Definition at line 1494 of file lib_ocm.c.

int edt_oc192_lock_clocks ( EdtDev edt_p,
int  timeout 
)

Parameters:
edt_p pointer to device structure

Parameters:
timeout timeout in ms to wait for the clocks to synch up
Returns:
0 on success, -1 on failure
Locks both 100 Mhz reference clocks on the OC192 board

Definition at line 1349 of file lib_ocm.c.

char* edt_oc192_mezz_filename ( EdtDev edt_p,
EdtLineRate  line_rate 
)

Parameters:
edt_p pointer to device structure

Parameters:
line_rate rate constant
Returns:
OC192 mezzanine file name for a line rate, NULL if not a valid rate constant
Called by edt_ocx_mezz_filename.

Definition at line 1408 of file lib_ocm.c.

int edt_oc192_set_clock_select ( EdtDev edt_p,
EdtLineRate  line_rate 
)

Parameters:
edt_p pointer to device structure

Parameters:
line_rate rate constant
Returns:
0 on success
This calls edt_ocm_set_clock_select for channel 0 For OC192 it enables the PLL.

Definition at line 1634 of file lib_ocm.c.

void edt_oc192_set_framer ( EdtDev edt_p,
int  flags 
)

Parameters:
edt_p pointer to device structure

Parameters:
flags Turns on or off framer and descramble based on flags

Definition at line 1707 of file lib_ocm.c.

int edt_oc192_set_tagging ( EdtDev edt_p,
int  state,
int  tagid 
)

Parameters:
edt_p pointer to device structure

Parameters:
state turn on or off
tagid # between 0 and 3 to set which piece of STM64 stream to capture
Returns:
0 when on success.
edt_oc192_wait_for_frame Checks the framing lock bit, will fail with timeout if timeout is non-zero.

Definition at line 2035 of file lib_ocm.c.

int edt_oc192_speed_capable ( EdtDev edt_p,
EdtLineRate  line_rate 
)

Parameters:
edt_p pointer to device structure

Parameters:
line_rate Desired rate constant for the channel
Returns:
0 if capable of deignated rate, -1 if not
Returns whether this channel is capable of this line rate

Definition at line 1526 of file lib_ocm.c.

int edt_oc192_wait_for_frame ( EdtDev edt_p,
int  timeout 
)

Parameters:
edt_p pointer to device structure

Parameters:
timeout timeout value in ms
Returns:
0 when in frame, -1 if timed out.
edt_oc192_wait_for_frame Checks the framing lock bit, will fail with timeout if timeout is non-zero.

Definition at line 1995 of file lib_ocm.c.


Generated on Mon May 12 16:39:12 2008 by  doxygen 1.5.1