libvpb
4.2.61
|
Public Member Functions | |
Comm () | |
Constructor. The InitBoards() method actually opens the comm links. | |
~Comm () | |
Closes down the comm link to the VPBs. | |
void | InitBoards () |
Second stage initialisation. More... | |
unsigned int | GetBoardCount () const |
Return the total number of VPB boards currently registered. | |
unsigned int | GetCountryCode () const |
Return the global country code from vpb.conf . More... | |
void | PutMessageVPB (unsigned short board, uint16_t *mess) |
Send a message to the DSP message queue. More... | |
int | GetMessageVPB (unsigned short board, uint16_t *mess) |
Gets a message from the DSP message queue. More... | |
void | WaitForMessageVPB (unsigned short board, uint16_t *mess, unsigned short mtype, unsigned short wait) |
Wait for a DSP message of a certain type. More... | |
const VPBHANDLE & | LookupHandle (int handle) const |
Look up the VPBHANDLE entry for handle. | |
int | NewHandle (int board, int port) |
Return a new handle for a port on some board. | |
VPBREG * | vpbreg (unsigned short board) |
Return a pointer to the VPBREG structure for some board. | |
|
inline |
Return the global country code from vpb.conf
.
If no global country code was configured there, it will return 0.
References VPBRegister::GetCountryCode().
Referenced by VTCore::Reset().
int Comm::GetMessageVPB | ( | unsigned short | board, |
uint16_t * | mess | ||
) |
Gets a message from the DSP message queue.
The length of the message is stored in its first word.
board | The VPB board number. |
mess | A pointer to storage for the message. |
VPB_OK
if a message was read, else COMM_EMPTY
if no messages were in the queue.MonitorMessageQueue
thread already has that privilege. References DD_PCI, VPBREG::ddmodel, VPBREG::hostdsp, and VPBREG::upmess.
Referenced by WaitForMessageVPB().
void Comm::InitBoards | ( | ) |
Second stage initialisation.
This permits the board specific code to access the global Comm
object and the VPBRegister
during their initialisation.
References VPBREG::cardnum, VPBREG::cardtypnum, VPBRegister::GetBoardCount(), VPBREG::model, VPB_OPCI, VPB_OSW, VPB_PRI, VPB_V4LOG, and VPB_V4PCI.
void Comm::PutMessageVPB | ( | unsigned short | board, |
uint16_t * | mess | ||
) |
Send a message to the DSP message queue.
board | The VPB board number. |
mess | A pointer to the message to send. Its length is in the first word. |
References DD_PCI, VPBREG::ddmodel, VPBREG::dnmess, and VPBREG::hostdsp.
Referenced by V4PCIToneGen::ImplStart(), V4PCIToneGen::ImplStop(), ring_station_async(), set_codec_reg(), V4PCI_DSP::SetHookState(), and OpenPri::SetHookState().
void Comm::WaitForMessageVPB | ( | unsigned short | board, |
uint16_t * | mess, | ||
unsigned short | mtype, | ||
unsigned short | wait | ||
) |
Wait for a DSP message of a certain type.
Messages of other types are discarded.
board | The VPB board number. |
mess | A pointer to storage for the message. It must be sufficient to store the desired message. |
mtype | The type of message to wait for. |
wait | The number of seconds to wait for it. |
Wobbly | will be thrown if the wait time elapses and the message has not been received. |
References GetMessageVPB(), and Timer::start().