OCM Mezzanine Access Functions
[OCM/OC192 Library]


Detailed Description

Setup and diagnostic functions specific to OCM mezzanine channels.


Functions

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

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

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

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

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

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

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

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

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

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

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


Function Documentation

int edt_ocm_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).
Sets a bit in the demux registers to enable/disable a particular column in the input.

Definition at line 3372 of file lib_ocm.c.

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

Parameters:
edt_p pointer to device structure

Parameters:
line_rate Line Rate constant - Currently must OC48_RATE or STM16_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 the equivalent OC number - 3 for OC3, 12 for OC12, etc.
Returns:
0 on success, -1 on parameter error
Gets the bits in the demux registers that enable/disable a particular column in the input.

Definition at line 3307 of file lib_ocm.c.

int edt_ocm_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 3423 of file lib_ocm.c.

int edt_ocm_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 should correspond to the OC line rate - 12 for OC12, 48 for OC48, etc. (STM rates should be multiplied by 3).
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 3234 of file lib_ocm.c.

int edt_ocm_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 595 of file lib_ocm.c.

int edt_ocm_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
mezz_0 Optional alternate mezzanine bitfile names
mezz_1 Defaults to ocm48 and ocm12
Returns:
0 on success
edt_ocm_load_default_mezzanine Loads ocm48 in ch 0, ocm12 in ch 1 unless overriden by parameters. Equivalent to the command line "ocmload"

Definition at line 494 of file lib_ocm.c.

int edt_ocm_lock_clocks ( EdtDev edt_p,
int  timeout 
)

Parameters:
edt_p pointer to device structure

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

Definition at line 416 of file lib_ocm.c.

char* edt_ocm_mezz_filename ( EdtDev edt_p,
EdtLineRate  line_rate 
)

Parameters:
edt_p pointer to device structure

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

Definition at line 445 of file lib_ocm.c.

int edt_ocm_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
Select the correct clock source for the line rate.

Definition at line 635 of file lib_ocm.c.

int edt_ocm_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 designated rate, -1 if not
Returns whether this channel is capable of this line rate

Definition at line 547 of file lib_ocm.c.

int edt_ocm_wait_for_frame ( EdtDev edt_p,
int  timeout 
)

Parameters:
edt_p pointer to device structure

Parameters:
timeout timeout value in ms
Returns:
0 on success, -1 on timeout

Definition at line 891 of file lib_ocm.c.


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