02.03.2014 Views

BSP Developer's Guide

BSP Developer's Guide

BSP Developer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VxWorks 5.5<br />

<strong>BSP</strong> Developer’s <strong>Guide</strong><br />

pLinkHdr<br />

Returns an LL_HDR_INFO structure containing header information that is<br />

dependent upon the particular data-link layer that the END implements. For<br />

more information, see Tracking Link-Level Information: LL_HDR_INFO, p.287.<br />

pSpare<br />

Expects a pointer to the spare information (if any) that was passed down to the<br />

MUX using the pSpare parameter of the muxBind( ) call. This information is<br />

passed back up to the protocol by each receiveRtn call. The use of this<br />

information is optional and protocol-specific.<br />

Passing Error Messages Up to the Protocol: stackError( )<br />

The MUX uses the stackError( ) routine to pass error messages from the device to<br />

the protocol. Your code for this routine must have an appropriate response for all<br />

possible error messages. The prototype for the stackError( ) routine is as follows:<br />

void stackError<br />

(<br />

END_OBJ* pEnd, /* pointer to END_OBJ */<br />

END_ERR* pError, /* pointer to END_ERR */<br />

void* pSpare /* pointer to protocol private data passed in muxBind */<br />

)<br />

You must declare your stackShutdownRtn( ) as returning void. Thus, there is no<br />

returned function value for this routine. The parameters are:<br />

pEnd<br />

Expects the pointer returned as the function value of the muxBind( ) for this<br />

protocol. This pointer identifies the device to which the MUX has bound this<br />

protocol.<br />

pError<br />

Expects a pointer to an END_ERR structure, which end.h defines as follows:<br />

typedef struct end_err<br />

{<br />

INT32 errCode; /* error code, see above */<br />

char* pMesg; /* NULL-terminated error message, can be NULL */<br />

void* pSpare; /* pointer to user defined data, can be NULL */<br />

} END_ERR;<br />

308

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!