Sets the status of a channel.
int32 DSSetChannel (Item msgItem, DSRequestMsgPtr reqMsg, DSStreamCBPtr streamCBPtr, DSDataType streamType, long channelNumber, long channelStatus)
Sets the status of a channel. DSSetChannel()
sets the status of the specified channel within the stream.
DSSetChannel()
sets the members of the message data structure required to set the channel status. (The message is the DSRequestMsg
identified by reqMsg
.) DSSetChannel()
will call either SendMsg()
or WaitMsg()
to send the message. to the DataStreamer: SendMsg()
if reqMsg
specifies a message; WaitMsg()
if reqMsg
is set to NULL
.
msgItem
Item of the message.reqMsg
Pointer to the DSRequestMsg
message that is formatted and sent to the DataStreamer. A value of NULL
forces creation of an internal DSRequestMsg
message and synchronous operation.streamCBPtr
Pointer to the stream context block.streamType
Type of stream to which the request applies.channelNumber
Number of the channel whose status is being set.channelStatus
New status of the channel.
The members of reqMsg
are set to the following values:
whatToDo
kDSOpSetChannelmsg.setChannel.streamType
msg.setChannel.channelNumber
msg.setChannel.channelStatusPtr
These values are returned if the DataStreamer encounters an error while processing the message request:
kDSInvalidDSRequest
Invalid message (whatToDo
set to invalid value)kDSNoReplyPortErr
Could not locate item of the reply portSendMsg()
or WaitPort()
failed
The DataStreamer checks the validity of messages only if message checking is enabled when the DataStreamer is compiled (if the VALIDATE_REQUEST_CODE
symbol is enabled).
See “Error Messages” in the 3DO Portfolio Reference Manual for a listing of error messages returned by SendMsg()
and WaitPort()
.
DataStreamLib.h