Auto ID SDK v1.00 (beta) 5/15/2022
Utilities Class Reference

Commmonly used services that allow for "one liner" or as close to "one liner" service as possible. More...

Static Public Member Functions

static void SendPrintFile (string ipAddress, string fileName)
 Send file to printer's data port. fileName must include the full file name and path.
 
static void SendPrintString (string ipAddress, string data)
 Send string data to printer's data port.
 
static bool UpdateFirmware (string commDescriptor, string fileLocation, string password, int timeoutMins)
 Update firmware using file at fileLocation to printer using password and connection commDescriptor with a timeoutMins in minutes. More...
 

Detailed Description

Commmonly used services that allow for "one liner" or as close to "one liner" service as possible.

Services such as sending a print job, getting printer status.

Remarks
This is where the services that can be achieved with one liners go.
For example:
  • 1.) Send a print job.
    • User Story: I don't want a complicated connection setup...just let me send a print file to the printer ?
  • 2.) Update firmware

Examples

Send print job

using System;
using System.IO;
using System.Text;
namespace OnelinerSnippet
{
{
public static void MainSendPrintFile(string[] args)
{
string ptrIp = "192.168.1.53";
string fileToSend = @"C:\testFiles\Hello.pgl";
Utilities.SendPrintFile(ptrIp, fileToSend); // Using SDK Utilties to send print job
}
}
}
static void SendPrintFile(string ipAddress, string fileName)
Send file to printer's data port. fileName must include the full file name and path.
Definition: Utilities.cs:44
Definition: Utilities.cs:13
Definition: TcpComm.cs:14
Definition: TcpComm.cs:14


Examples

Update firmware

using System;
using System.IO;
using System.Text;
namespace OnelinerSnippet
{
class UpdateFW
{
public static void MainUpdateFW(string[] args)
{
string ptrIp = "192.168.1.53";
string fileToSend = @"C:\vela_ra2_rvpc\00_Ptr_SFWR_T8\p301382\P301382.prg";
//string fileToSend = @"C:\vela_ra2_rvpc\00_Ptr_SFWR_T8\P300906_200217\P300906.prg";
if(Utilities.UpdateFirmware(ptrIp, fileToSend, "abc123", 10)) // requires printer password = "abc123" (change webpage/configuration/administration/Root Password), and firmware file available
{
Console.WriteLine("Fiwmare Update successful.");
}
else
{
Console.WriteLine("Fiwmare Update FAILES !!");
}
}
}
}

Member Function Documentation

◆ UpdateFirmware()

static bool UpdateFirmware ( string  commDescriptor,
string  fileLocation,
string  password,
int  timeoutMins 
)
inlinestatic

Update firmware using file at fileLocation to printer using password and connection commDescriptor with a timeoutMins in minutes.

Returns true if successfully sent firmware to printer, false otherwise.
Note that due to printer should not be powered off during software update and update may take serveral minutes.
e.g. commDescriptor could be the IP address of the printer i.e. "192.168.1.101"