The IncJet devices can communicate using several different methods. More...

Public Types | |
| enum | ECode { kInvalid = 0xff, kPowerUpMsg = 0x01, kAcknowledgeMsg = 0x09, kKeepAlive = 0x30, kReportIOStates = 0x65, kIOStates = 0x66, kDoneWithFiles = 0x70, kSendIjsFile = 0x72, kSendIjbFile = 0x7d, kRequestStatus = 0x8d, kImagerStatus = 0x8e } |
These are the 1-byte "MsgID" values described in section 6.0 of the document. More... | |
Public Member Functions | |
| BinaryProtocol (void) | |
| Constructor. More... | |
| ~BinaryProtocol (void) | |
| Destructor. More... | |
| BinaryProtocol (const VBytes &v, const size_t number_of_bytes) | |
| Parse the data in the vector. More... | |
| BinaryProtocol & | parse (const VBytes &v, const size_t number_of_bytes) |
| Parse the data in the vector. More... | |
| VBytes | message_data (void) const |
| Extract just the message data bytes from the content. Will return an empty vector if there are no data bytes. More... | |
| std::string | describe (void) const |
| Describe in English text the message contained within content. More... | |
| BinaryProtocol & | create (const ECode new_code) |
| Create a new sequence of bytes to send out to the imager device. More... | |
| BinaryProtocol & | append (const VBytes &file_contents) |
| Append the vector to the existing content buffer. Automatically updates the "NumBytes" value. More... | |
Public Attributes | |
| uint8_t | sequence_number |
| SeqNum, 5th byte into the data vector. More... | |
| ECode | code |
| The message ID extracted from the parsed content, 7th byte into the data vector. More... | |
| VBytes | content |
| A full copy of the bytes that were parsed. More... | |
The IncJet devices can communicate using several different methods.
The document "IJM017B OnBoardRIP Software Integration Guide" describes a method called "binary protocol".
The message format is described in section 4.2, "Binary Protocol Command Structure":
| Offset | Field | Description |
|---|---|---|
| 0x00 | STX | Start of transmission. Should be 0x02. |
| 0x01-0x04 | NumBytes | Number of bytes following this parameter, beginning with Checksum field and ending with the ETX. |
| 0x05 | Checksum | Unused. |
| 0x06 | SeqNum | Message sequence number. Possibly unused? |
| 0x07 | MsgID | Message ID. |
| 0x08-... | TBuff | Message data goes here. |
| ... + 1 | ETX | End of transmission. Should be 0x03. |
The SeqNum field is not described in the document. Start with 1 and keep increasing it.
The MsgID field is the "code" in section 6, starting on page 18. Not all codes are described in the document, some had to be reverse engineered. See BinaryProtocol::ECode.
|
strong |
These are the 1-byte "MsgID" values described in section 6.0 of the document.
| BinaryProtocol::BinaryProtocol | ( | void | ) |
Constructor.
| BinaryProtocol::~BinaryProtocol | ( | void | ) |
Destructor.
| BinaryProtocol::BinaryProtocol | ( | const VBytes & | v, |
| const size_t | number_of_bytes | ||
| ) |
| BinaryProtocol & BinaryProtocol::parse | ( | const VBytes & | v, |
| const size_t | number_of_bytes | ||
| ) |
Parse the data in the vector.
| Lox::Exception | if the data cannot be parsed |
References code, content, describe(), and sequence_number.
Referenced by BinaryProtocol().


| VBytes BinaryProtocol::message_data | ( | void | ) | const |
Extract just the message data bytes from the content. Will return an empty vector if there are no data bytes.
Referenced by describe(), and BinaryProtocolConnection::write_and_expect_ack().

| std::string BinaryProtocol::describe | ( | void | ) | const |
Describe in English text the message contained within content.
References code, and message_data().
Referenced by parse(), and BinaryProtocolConnection::write_and_expect_ack().


| BinaryProtocol & BinaryProtocol::create | ( | const ECode | new_code | ) |
Create a new sequence of bytes to send out to the imager device.
References code, content, and sequence_number.
Referenced by BinaryProtocolConnection::initiate_communications(), BinaryProtocolConnection::send_eof(), and BinaryProtocolConnection::send_file().

| BinaryProtocol & BinaryProtocol::append | ( | const VBytes & | file_contents | ) |
Append the vector to the existing content buffer. Automatically updates the "NumBytes" value.
| Lox::Exception | if the binary protocol message is invalid (too small) |
| Lox::Exception | if the binary protocol message does not end with ETX (0x03) |
References content.
Referenced by BinaryProtocolConnection::send_file().

| uint8_t BinaryProtocol::sequence_number |
| ECode BinaryProtocol::code |
The message ID extracted from the parsed content, 7th byte into the data vector.
Referenced by create(), describe(), BinaryProtocolConnection::initiate_communications(), message_data(), parse(), and BinaryProtocolConnection::write_and_expect_ack().
| VBytes BinaryProtocol::content |
A full copy of the bytes that were parsed.
Referenced by append(), create(), BinaryProtocolConnection::initiate_communications(), message_data(), parse(), and BinaryProtocolConnection::write_and_expect_ack().