CAS40 flows¶
The CAS40 protocol involves a sender and a receiver. Both sides are defined in advance, and do not exchange roles during transfer.
Initiate the connection¶
In order to initiate the connection, the communication schema is the following:
See CAS40 packet format for more information.
Send or receive data¶
For the Data or screen reception rationale or Data or screen sending rationale, the flow is the following:
The number of data parts, and the size of each of them, is determined using on the header, and is not communicated using the protocol itself.
Note
This is the opposite approach from Protocol 7.00, where the interpretation can be done entirely after the file has been sent, even for unknown data types. Here, you need to make at least a partial interpretation of the header.
On CAS40 headers, the interpretation must be done per data type.
Every data type can either be final, i.e. be the last one to be transmitted on a given communication before the sender considers the communication as completed, or not.
When only non-final data types are used, the sender can end the communication manually by sending a sentinel header, in the form of a \x17\xFF End data type.
AL Mode¶
When a sender wants to transmit all of its data, it can use an AL mode, which causes the following flow:
In this mode, all data types that are normally final become non-final. This includes \x17\xFF End, which does not end the communication anymore, as once this mode is enabled, only \x17\x17 AL End is able to do this.
See the following for more information: