Crate ssp

Source
Expand description

This library is an implementation of the Smiley Secure Protocol.

From the SSP Implementation Guide:

Smiley Secure Protocol (SSP) is a serial communication protocol designed by Innovative
Technology LTD to address problems historically experienced by cash handling systems in
gaming machines. Problems such as acceptor swapping, reprogramming acceptors and
line tapping.

The current implementation supports both the standard (SSP), and encrypted variant (eSSP).

Re-exports§

pub use message::index as message_index;
pub use channel_value_data::*;
pub use configure_bezel::*;
pub use dataset_version::*;
pub use disable::*;
pub use disable_payout::*;
pub use display_off::*;
pub use display_on::*;
pub use empty::*;
pub use enable::*;
pub use enable_payout::*;
pub use encrypted::*;
pub use encryption_reset::*;
pub use error::*;
pub use event_ack::*;
pub use firmware::*;
pub use get_barcode_data::*;
pub use get_barcode_inhibit::*;
pub use get_barcode_reader_configuration::*;
pub use hold::*;
pub use host_protocol_version::*;
pub use keys::*;
pub use last_reject_code::*;
pub use message::*;
pub use payout_by_denomination::*;
pub use poll::*;
pub use poll_with_ack::*;
pub use reject::*;
pub use request_key_exchange::*;
pub use reset::*;
pub use rng::*;
pub use serial_number::*;
pub use set_barcode_inhibit::*;
pub use set_barcode_reader_configuration::*;
pub use set_encryption_key::*;
pub use set_generator::*;
pub use set_inhibits::*;
pub use set_modulus::*;
pub use setup_request::*;
pub use smart_empty::*;
pub use sync::*;
pub use types::*;
pub use unit_data::*;

Modules§

aes
AES implementation from the ITL SSP SDK
arrays
Work-around for const-generic arrays in serde from MikailBag:
channel_value_data
Enable the device.
configure_bezel
Configure the color of the bezel.
crc
CRC-16 checksum calculation
dataset_version
Get the dataset version loaded on the device.
disable
Disable the device.
disable_payout
Message types for disabling a payout device.
display_off
Turn the bezel light off when the device is enabled.
display_on
Turn the bezel light on when the device is enabled.
empty
Empty the notes held in the device into the cash box.
enable
Enable the device.
enable_payout
Messages for enabling devices equipped with a Smart Payout module.
encrypted
Messages for encrypted SSP (eSSP) communication.
encryption_reset
Reset the device fixed key to default.
error
Error types for the library.
event_ack
Causes the device to continue with operations after it has been sending repeating PollWithAckResponse messages.
firmware
get_barcode_data
Get the last valid barcode ticket data from the device.
get_barcode_inhibit
Get the current barcode/currency inhibit status of the device.
get_barcode_reader_configuration
Gets the barcode reader configuration on the device.
hold
Enable the device.
host_protocol_version
Sets the host protocol version on the device.
keys
Keys for encrypted communication over eSSP.
last_reject_code
Enable the device.
len
Lengths of various messages (full-byte length, not data length).
message
Generic message types for the library.
payout_by_denomination
Dispense notes to the customer by denomination.
poll
Poll the device for events since the last poll message.
poll_with_ack
Poll the device for events since the last poll message, events need to be ACKed by the host.
primes
reject
Reject the bill currently being processed by the device.
request_key_exchange
Requests a key exchange as the final part of the eSSP encryption negotiation sequence.
reset
Reset the device.
rng
serial_number
Get the device serial number.
set_barcode_inhibit
Set the current barcode/currency inhibit status of the device.
set_barcode_reader_configuration
Sets the barcode reader configuration on the device.
set_encryption_key
Allows the host to change the fixed part of the eSSP key.
set_generator
Sets the generator as part of the eSSP encryption negotiation sequence.
set_inhibits
Set the current barcode/currency inhibit status of the device.
set_modulus
Sets the modulus as part of the eSSP encryption negotiation sequence.
setup_request
Request the setup information from the device.
smart_empty
Empty the notes held in the device into the cash box, and track the note information.
sync
Synchronise the device with the host.
types
Generic message field types used for command and response messages.
unit_data
Enable the device.

Macros§

anti_bool_enum
Creates an named anti-boolean-like enum (set(false) or unset(true) enums).
bool_enum
Creates an named boolean-like enum (set or unset enums).
impl_command_display
Implements the default formatter for CommandOps named types.
impl_command_ops
Implements the defaults for the CommandOps trait for a named message type.
impl_default
Implements the Default trait for named types with Self::new() function.
impl_encrypted_message_ops
Implement the defaults for the MessageOps trait for an encrypted message type with variable length.
impl_message_display
Implements the default formatter for MessageOps named types.
impl_message_from_buf
Implement From<_> traits to convert buffer types into a named message type.
impl_message_ops
Implements the defaults of the MessageOps trait for a named message type.
impl_response_display
Implements the default formatter for ResponseOps named types.
impl_response_ops
Implements the defaults for the ResponseOps trait for a named message type.
impl_var_message_ops
Implement the defaults for the MessageOps trait for a named message type with variable length.
impl_wrapped_message_ops
Implement the defaults for the MessageOps trait for a named message type with variable length.
inner_enum
Provides convenience functions to deconstruct an enum with new-type variants.
make_key
Creates a named type to represent a key struct used in encryption.
make_list
Creates a list container type for a named type.
tuple_struct
Creates a tuple struct with a given name, base type, and documentation.
tuple_struct_ser
Creates a serializable tuple struct with a given name, base type, and documentation.

Constants§

CHANNEL_TIMEOUT_ATTEMPTS
CHANNEL_TIMEOUT_MS
MAX_CHANNELS

Statics§

CHANNELS
Device channels for storing notes.

Functions§

channel_value
Gets the ChannelValue of the given channel index.
channel_value_with_lock
While holding a lock on global channels, gets the ChannelValue of the given channel index.
channels
Gets a reference to the number of configured channels.
channels_mut
Gets a mutable reference to the number of configured channels.
configure_channels
Used to set the configured channels after a device call that returns the number and value of configured channels, e.g. SetupRequest.
configure_channels_with_lock
While holding a mutable lock on global channels, used to set the configured channels after a device call that returns the number and value of configured channels, e.g. SetupRequest.
lock_channels
Acquires a lock on the global Channels.

Type Aliases§

Channels
Vec