Previous PageTable Of Contents../index.htmlIndexNext Page

dt_castencode( )

Description | Example | Errors | See Also

Name:

int dt_castencode (msgp, encmsgbufp)

Inputs:

void *msgp

  Pointer to command message block to encode

 

void *encmsgbufp

  Pointer to destination buffer of encoded message block

Returns:

0 on success
-1 on failure

Includes:

dtilib.h

Category:

CAS DTI Convenience

Mode:

synchronous

Top Of PageDescription

The dt_castencode( ) function is called internally by dt_castmgmt( ). For every CAS DTI command message block passed to dt_castmgmt( ), the dt_castencode( ) function is called to validate and encode the message before it is written to the firmware. This function is offered to localize the tasks of host system issues (i.e. byte swapping) and message formation regarding messages that are passed across the host system bus.

The dt_castencode( ) function takes as its first parameter a command message block. It will use the encmsgbufp parameter to return the validated/encoded message block. Direct modification of the encoded message block is not allowed. The operation of this function does not prevent msgp and encmsgbufp from being the same buffer.

Top Of PageExample

Top Of PageErrors

This function returns -1 if it does not recognize the msg_code field in the command message block.

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated November, 2001