Interface IPyramidDevice
IPyramidDevice is a contract defining what actions all Pyramid products in this library will support. These devices own their own communication source and can be used in MVC binding patterns which is why they are marked IDisposable/>.
Namespace: PTIRelianceLib
Assembly: PTIRelianceLib.dll
Syntax
public interface IPyramidDevice : IDisposable
Properties
| Improve this Doc View SourceIsDeviceReady
Returns true if device is ready to be read from or written to
Declaration
bool IsDeviceReady { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceFlashUpdateTarget(BinaryFile, ProgressMonitor)
Install the specified firmware BinaryFile on
this device. With few exceptions, most any firmware can be installed
using this method. The reporter
ProgressMonitor
provides callbacks for messages, progress, and errors.
Declaration
ReturnCodes FlashUpdateTarget(BinaryFile firmware, ProgressMonitor reporter)
Parameters
Type | Name | Description |
---|---|---|
BinaryFile | firmware | Firmware image data |
ProgressMonitor | reporter | Progress callback instance |
Returns
Type | Description |
---|---|
ReturnCodes |
|
GetFirmwareRevision()
Returns the firmware Revlev of this device.
If there is an error reading the firmware revision, a Revlev of
0.0.0
will instead be returned.
Declaration
Revlev GetFirmwareRevision()
Returns
Type | Description |
---|---|
Revlev | Revision |
GetSerialNumber()
Returns the serial number for this device
Declaration
string GetSerialNumber()
Returns
Type | Description |
---|---|
System.String |
|
Ping()
Ping returns Okay if the device is online and not in the middle of critical work.
Declaration
ReturnCodes Ping()
Returns
Type | Description |
---|---|
ReturnCodes |
|
ReadConfiguration()
Reads current configuration from this device and returns result as a JSON BinaryFile If there is an error reading the configuration, an empty BinaryFile is returned. You can check for an empty result via Empty.
A configuration is a JSON formatted file that contains settings like baud rate, paper width, and print quality.
Declaration
BinaryFile ReadConfiguration()
Returns
Type | Description |
---|---|
BinaryFile | BinaryFile |
Reboot()
Immediately reboots this device, taking care to handle any required port disconnection and reconnection details.
Declaration
ReturnCodes Reboot()
Returns
Type | Description |
---|---|
ReturnCodes |
|
SendConfiguration(BinaryFile)
Writes the configuration BinaryFile specified by
config
to this device. The configuration is a JSON file
describing the configuration to apply. Any fields omitted from the
configuration file will be set to its default value.
There are two ways to obtain a JSON configuration file.
- Using Reliance Tools for PC you may click File->Save Config. This will produce a valid JSON configuration of the attached printer. https://pyramidacceptors.com/app/reliance-tools/
- Use ReadConfiguration() to get a configuration file.
Declaration
ReturnCodes SendConfiguration(BinaryFile config)
Parameters
Type | Name | Description |
---|---|---|
BinaryFile | config | Configuration to apply |
Returns
Type | Description |
---|---|
ReturnCodes |
|