
Public Member Functions | |
| BinaryProtocolConnection (const std::string ip, const int tcp) | |
| Constructor. More... | |
| ~BinaryProtocolConnection (void) | |
| Destructor. More... | |
| BinaryProtocolConnection & | connect (void) |
| Connect to the IncJet device. More... | |
| BinaryProtocolConnection & | initiate_communications (void) |
| Initiate communications. More... | |
| BinaryProtocolConnection & | send_file (const bool is_ijs, const VBytes &file_contents) |
| Upload a file. More... | |
| BinaryProtocolConnection & | send_eof (void) |
| Send end-of-file. More... | |
| BinaryProtocolConnection & | write_and_expect_ack (const BinaryProtocol &bp) |
| Write the specified command and expect the IncJet device to reply with an ACK (0x09). More... | |
Public Attributes | |
| int | port |
| std::string | ip_address |
| std::string | name |
| StreamingSocket | sock |
| BinaryProtocolConnection::BinaryProtocolConnection | ( | const std::string | ip, |
| const int | tcp | ||
| ) |
Constructor.
| BinaryProtocolConnection::~BinaryProtocolConnection | ( | void | ) |
Destructor.
| BinaryProtocolConnection & BinaryProtocolConnection::connect | ( | void | ) |
Connect to the IncJet device.
| Lox::Exception | if the TCP connection fails |
Referenced by SessionComponentTransfer::run().

| BinaryProtocolConnection & BinaryProtocolConnection::initiate_communications | ( | void | ) |
Initiate communications.
| Lox::Exception | if there is an error while waiting to read from the socket |
| Lox::Exception | if there was a timeout while waiting to read from the socket |
| Lox::Exception | if there was an unknown/undocumented problem while waiting to read from the socket |
| Lox::Exception | if the first thing read from the device is unexpected |
| Lox::Exception | if we fail to write to the socket |
References BinaryProtocol::code, BinaryProtocol::content, and BinaryProtocol::create().
Referenced by SessionComponentTransfer::run().


| BinaryProtocolConnection & BinaryProtocolConnection::send_file | ( | const bool | is_ijs, |
| const VBytes & | file_contents | ||
| ) |
Upload a file.
References BinaryProtocol::append(), BinaryProtocol::create(), and write_and_expect_ack().
Referenced by SessionComponentTransfer::run().


| BinaryProtocolConnection & BinaryProtocolConnection::send_eof | ( | void | ) |
Send end-of-file.
References BinaryProtocol::create(), and write_and_expect_ack().
Referenced by SessionComponentTransfer::run().


| BinaryProtocolConnection & BinaryProtocolConnection::write_and_expect_ack | ( | const BinaryProtocol & | bp | ) |
Write the specified command and expect the IncJet device to reply with an ACK (0x09).
| Lox::Exception | if we fail to write to the socket |
References BinaryProtocol::code, BinaryProtocol::content, BinaryProtocol::describe(), and BinaryProtocol::message_data().
Referenced by send_eof(), and send_file().

