01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Index page<br />

Interrupt 0xA0 service 0x38: Get file name by handle<br />

Parameters<br />

AH<br />

CX<br />

Returns the file name string corresponding to a specified file handle.<br />

Must be 0x38.<br />

File handle<br />

ES:BX<br />

pointer to string, must be 13 chars long (12 + Null termination)<br />

Return Value<br />

Top of list<br />

Index page<br />

AX=0: Success, contains Sharing mode if al=1<br />

AX=-1: Invalid file handle<br />

Interrupt 0xA0 service 0x40: Install a UDP Cfg Callback<br />

Parameters<br />

AH<br />

ES:DI<br />

Comments<br />

Top of list<br />

Install a UDP Config Server User Callback function.<br />

Must be 0x40.<br />

Pointer to the User Callback function<br />

This API Function installs a User Callback function for the UDP Config Server. If a UDP Cfg Request with the command number 06<br />

arrives, this User Callback function will be called. This allows you to realize your own UDP Config sub protocol and commands.<br />

The UDP Cfg Callback function receives an argument with information about the UDP Cfg Request and its requester. This<br />

information structure and the function must be declared as specified in the description below:<br />

typedef struct UdpCfgSrv_UserCBInfo<br />

{<br />

int length; // Length of this struct<br />

struct sockaddr_in *fromAddrPtr; // Sender address pointer<br />

int udpCfgSD; // UDP Config Server's Socket Descriptor<br />

char *dataPtr; // Data of Request package<br />

unsigned dataLength; // Length of request package<br />

};<br />

void huge MyUdpCfgSrvCB( struct UdpCfgSrv_UserCBInfo *infoPtr );<br />

If the callback function returns with the dataPtr and dataLength fields in the UdpCfgSrv_UserCBInfo structure both non-zero,<br />

the UDP Config Server will send the dataLength bytes from location referenced by dataPtr back to the requester. If the pointer<br />

is set to null or the dataLength field is set to 0, no data will be sent back to the requester.<br />

To remove an installed callback function, call this function with a null pointer.<br />

For more Information on the UDP Config Server and its protocol, refer to the UDP Config Server description available on our website.<br />

Note: The data sent and received is limited to 300 bytes maximum.<br />

Page 101 / 400

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

Saved successfully!

Ooh no, something went wrong!