sangoma_hptdm_span Struct Reference

Span structure. Structure describing a single span. More...

#include <libhpsangoma.h>

Collaboration diagram for sangoma_hptdm_span:

Collaboration graph
[legend]
List of all members.

Public Attributes

int init
int span_no
char if_name [100]
int sock
int chunk_sz
int max_chans
int tx_size
unsigned char idle
unsigned int timeslot_cfg
unsigned int hwcoding
sangoma_hptdm_chan_map_t chan_idx [SMG_HP_TDM_MAX_CHANS]
char rx_data [SMG_HP_MAX_SPAN_DATA]
int rx_len
char tx_data [SMG_HP_MAX_SPAN_DATA]
int tx_len
sangoma_hptdm_span_reg_t span_reg
wan_if_cfg_t span_cfg
wan_udp_hdr_t wan_udp
int(* open_chan )(struct sangoma_hptdm_span *span, sangoma_hptdm_chan_reg_t *chan_reg, unsigned int chan_no, sangoma_hptdm_chan_t **chan_ptr)
 Method: open a channel inside a span.
int(* close_chan )(sangoma_hptdm_chan_t *chan)
 Method: close a channel inside the span.
int(* is_chan_closed )(sangoma_hptdm_chan_t *chan)
 Method: check if channel is closed.
int(* run_span )(struct sangoma_hptdm_span *span)
 Method: run main span execution logic: rx/tx/oob.
int(* close_span )(struct sangoma_hptdm_span *span)
 Method: close span.
int(* event_ctrl )(struct sangoma_hptdm_span *span, hp_tdmapi_tx_event_t *event)
 Method: used by user app to execute events on current span.
int(* get_cfg )(struct sangoma_hptdm_span *span, wan_if_cfg_t *cfg)
 Method: request full span configuration from a current span.

Detailed Description

Span structure. Structure describing a single span.

Definition at line 173 of file libhpsangoma.h.


Member Data Documentation

sangoma_hptdm_chan_map_t sangoma_hptdm_span::chan_idx[SMG_HP_TDM_MAX_CHANS]

array of maximum number of channels in a span

Definition at line 206 of file libhpsangoma.h.

int sangoma_hptdm_span::chunk_sz

chunk size for each channel inside the span

Definition at line 188 of file libhpsangoma.h.

int(* sangoma_hptdm_span::close_chan)(sangoma_hptdm_chan_t *chan)

Method: close a channel inside the span.

Parameters:
chan chan object

int(* sangoma_hptdm_span::close_span)(struct sangoma_hptdm_span *span)

Method: close span.

Parameters:
span span object

int(* sangoma_hptdm_span::event_ctrl)(struct sangoma_hptdm_span *span, hp_tdmapi_tx_event_t *event)

Method: used by user app to execute events on current span.

Parameters:
span span object
event event object

int(* sangoma_hptdm_span::get_cfg)(struct sangoma_hptdm_span *span, wan_if_cfg_t *cfg)

Method: request full span configuration from a current span.

Parameters:
span span object
cfg configuratoin object to be filled by span

unsigned int sangoma_hptdm_span::hwcoding

hw data encoding: ULAW/ALAW obtained from hw interface

Definition at line 203 of file libhpsangoma.h.

unsigned char sangoma_hptdm_span::idle

idle flag used to fill an unused channel

Definition at line 197 of file libhpsangoma.h.

char sangoma_hptdm_span::if_name[100]

span hw interface name to which span is bounded to

Definition at line 182 of file libhpsangoma.h.

int sangoma_hptdm_span::init

span init flag used to determine if span is being used

Definition at line 176 of file libhpsangoma.h.

int(* sangoma_hptdm_span::is_chan_closed)(sangoma_hptdm_chan_t *chan)

Method: check if channel is closed.

Parameters:
chan chan object

int sangoma_hptdm_span::max_chans

total number of channels configured in the span

Definition at line 191 of file libhpsangoma.h.

int(* sangoma_hptdm_span::open_chan)(struct sangoma_hptdm_span *span, sangoma_hptdm_chan_reg_t *chan_reg, unsigned int chan_no, sangoma_hptdm_chan_t **chan_ptr)

Method: open a channel inside a span.

Parameters:
span span object
chan_reg channel registration structure: callbacks and cfg
chan_no channel number - integer starting from 0
chan_ptr user container for channel object passed up to the user.

int(* sangoma_hptdm_span::run_span)(struct sangoma_hptdm_span *span)

Method: run main span execution logic: rx/tx/oob.

Parameters:
span span object
Run main span execution logic. This function peforms all socket operations on a hw interface. Rx/Tx/Oob. Receives data and demultiplexes it to channels. Receives oob data and passes user events global to all channels. Multiplexes all channel tx data into a single tx data block and passes it to hw iface.

char sangoma_hptdm_span::rx_data[SMG_HP_MAX_SPAN_DATA]

span rx data block: used to receive a block of data from hw interface: recv()

Definition at line 209 of file libhpsangoma.h.

int sangoma_hptdm_span::rx_len

span rx data len, obtained after a recv() call to hw interface

Definition at line 212 of file libhpsangoma.h.

int sangoma_hptdm_span::sock

span socket file descriptor used to rx/tx data to and from hw interface

Definition at line 185 of file libhpsangoma.h.

wan_if_cfg_t sangoma_hptdm_span::span_cfg

span config structure obtained from hw interface via managment ioctl call.

Definition at line 224 of file libhpsangoma.h.

int sangoma_hptdm_span::span_no

span number - integer starting from 0

Definition at line 179 of file libhpsangoma.h.

sangoma_hptdm_span_reg_t sangoma_hptdm_span::span_reg

span registration functions: contains user callback functions

Definition at line 221 of file libhpsangoma.h.

unsigned int sangoma_hptdm_span::timeslot_cfg

bit map of configured timeslots obtained from hw interface

Definition at line 200 of file libhpsangoma.h.

char sangoma_hptdm_span::tx_data[SMG_HP_MAX_SPAN_DATA]

span tx data block: used to transmit a block of data to hw interface: send()

Definition at line 215 of file libhpsangoma.h.

int sangoma_hptdm_span::tx_len

span tx data block len: passed to send() function

Definition at line 218 of file libhpsangoma.h.

int sangoma_hptdm_span::tx_size

total tx data size to hw interface. tx_size = max_chans * chunk_sz

Definition at line 194 of file libhpsangoma.h.

wan_udp_hdr_t sangoma_hptdm_span::wan_udp

span managment structure used to execute mgmnt ioctl commands to hw interface

Definition at line 227 of file libhpsangoma.h.


The documentation for this struct was generated from the following file:
Generated on Sun Aug 17 23:56:55 2008 for libhpsangoma by  doxygen 1.4.7