Command: CMD_PGM_START Destination: SD_PGM Destination Channel: 0
Description
Clients use this command to begin execution of a program in the . Only programs uploaded with the CMD_PGM_UPLOAD command may be executed. A socket is opened to the server and the new program is registered with the server before control is passed to the new program. The first three parameters passed to the program are the client number of the program that invoked this command, the client number of the new program and the socket file descriptor of the connection to the server.
Command Data Format
Name Arguments padding 32 bytes 0-120 bytes 0-3 bytes
NameThis is the filename of the program to be executed in the . If the name is less than 32 bytes long, it should be null padded.
ArgumentsResponse Data FormatThis is a NULL terminated string of arguments to be passed to the program. The first parameter passed to the program is the Channel number of the program that is starting it. The second parameter is the Channel number for the program being started. The third parameter is the file descriptor for the socket connection from the program being started to the server. These parameters appear after the Channel number.
Channel Padding 1 byte 3 bytes Channel
This is Channel number that should be used in the Frame Header of all commands to be sent to the program while it is running.
Response Return Codes
RESP_OK Execution of the command was successful. RESP_INVAL_PARAM The program does not exist or it was not uploaded via CMD_PGM_UPLOAD. RESP_TIMEOUT The program failed to send an Event containing its Channel number RESP_UNSUPPORTED This command is not supported on the specified channel. RESP_UNREG The specified source channel is not registered with the server. RESP_UNKNOWN_ERR An unknown error occurred.