SpringCard SpringCore Library for .NET  20.04.16
High-level access to the SpringCore devices
SpringCoreDirectCli.SpringCoreProgram Class Referenceabstract

Features that are common to all SpringCoreTools command-line utilities. More...

Inheritance diagram for SpringCoreDirectCli.SpringCoreProgram:
SpringCoreDirectCli.Program SpringCoreFlashCli.Program

Public Types

enum  ExitCode {
  Success = 0, BadArguments = -1, NotAllowedToRun = -2, DeviceNotFound = -3,
  DeviceRemoved = -4, DeviceOpenFailed = -5, DeviceStartFailed = -6, DeviceStopFailed = -7,
  DeviceExchangeFailed = -8, DeviceSEError = -10, DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12,
  FileNotFound = -20, FileInvalid = -21, SamReaderNotFound = -30, SamNotFound = -31,
  SamOperationFailed = -32, UnknownError = -40, Success = 0, BadArguments = -1,
  NotAllowedToRun = -2, DeviceNotFound = -3, DeviceRemoved = -4, DeviceOpenFailed = -5,
  DeviceStartFailed = -6, DeviceStopFailed = -7, DeviceExchangeFailed = -8, DeviceSEError = -10,
  DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12, FileNotFound = -20, FileInvalid = -21,
  SamReaderNotFound = -30, SamNotFound = -31, SamOperationFailed = -32, UnknownError = -40,
  Success = 0, BadArguments = -1, NotAllowedToRun = -2, DeviceNotFound = -3,
  DeviceRemoved = -4, DeviceOpenFailed = -5, DeviceStartFailed = -6, DeviceStopFailed = -7,
  DeviceExchangeFailed = -8, DeviceSEError = -10, DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12,
  FileNotFound = -20, FileInvalid = -21, SamReaderNotFound = -30, SamNotFound = -31,
  SamOperationFailed = -32, UnknownError = -40
}
 Error codes returned by the utilities when exiting. More...
 
enum  ExitCode {
  Success = 0, BadArguments = -1, NotAllowedToRun = -2, DeviceNotFound = -3,
  DeviceRemoved = -4, DeviceOpenFailed = -5, DeviceStartFailed = -6, DeviceStopFailed = -7,
  DeviceExchangeFailed = -8, DeviceSEError = -10, DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12,
  FileNotFound = -20, FileInvalid = -21, SamReaderNotFound = -30, SamNotFound = -31,
  SamOperationFailed = -32, UnknownError = -40, Success = 0, BadArguments = -1,
  NotAllowedToRun = -2, DeviceNotFound = -3, DeviceRemoved = -4, DeviceOpenFailed = -5,
  DeviceStartFailed = -6, DeviceStopFailed = -7, DeviceExchangeFailed = -8, DeviceSEError = -10,
  DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12, FileNotFound = -20, FileInvalid = -21,
  SamReaderNotFound = -30, SamNotFound = -31, SamOperationFailed = -32, UnknownError = -40,
  Success = 0, BadArguments = -1, NotAllowedToRun = -2, DeviceNotFound = -3,
  DeviceRemoved = -4, DeviceOpenFailed = -5, DeviceStartFailed = -6, DeviceStopFailed = -7,
  DeviceExchangeFailed = -8, DeviceSEError = -10, DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12,
  FileNotFound = -20, FileInvalid = -21, SamReaderNotFound = -30, SamNotFound = -31,
  SamOperationFailed = -32, UnknownError = -40
}
 Error codes returned by the utilities when exiting. More...
 
enum  ExitCode {
  Success = 0, BadArguments = -1, NotAllowedToRun = -2, DeviceNotFound = -3,
  DeviceRemoved = -4, DeviceOpenFailed = -5, DeviceStartFailed = -6, DeviceStopFailed = -7,
  DeviceExchangeFailed = -8, DeviceSEError = -10, DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12,
  FileNotFound = -20, FileInvalid = -21, SamReaderNotFound = -30, SamNotFound = -31,
  SamOperationFailed = -32, UnknownError = -40, Success = 0, BadArguments = -1,
  NotAllowedToRun = -2, DeviceNotFound = -3, DeviceRemoved = -4, DeviceOpenFailed = -5,
  DeviceStartFailed = -6, DeviceStopFailed = -7, DeviceExchangeFailed = -8, DeviceSEError = -10,
  DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12, FileNotFound = -20, FileInvalid = -21,
  SamReaderNotFound = -30, SamNotFound = -31, SamOperationFailed = -32, UnknownError = -40,
  Success = 0, BadArguments = -1, NotAllowedToRun = -2, DeviceNotFound = -3,
  DeviceRemoved = -4, DeviceOpenFailed = -5, DeviceStartFailed = -6, DeviceStopFailed = -7,
  DeviceExchangeFailed = -8, DeviceSEError = -10, DeviceSEAuthFailed = -11, DeviceSEOperationFailed = -12,
  FileNotFound = -20, FileInvalid = -21, SamReaderNotFound = -30, SamNotFound = -31,
  SamOperationFailed = -32, UnknownError = -40
}
 Error codes returned by the utilities when exiting. More...
 

Public Member Functions

bool DetectCompanionService ()
 
DirectDevice CreateAndOpenDevice (List< string > devices, int deviceIndex=0, BlockingCollection< DirectDevice.IncomingEvent > eventQueue=null)
 
bool GetDeviceListAndCheckIndex (ref int deviceIndex, bool listDevices, bool lShowDeviceDetails)
 

Static Public Member Functions

static void WriteTextFile (string FileName, string Content)
 
static byte[] ReadPem (string FileName, string pemHeader)
 
static byte[] ReadRawFile (string FileName)
 
static void WriteRawFile (string FileName, byte[] buffer)
 

Protected Types

enum  AccessMode { Direct, Companion, DirectOrCompanion, PCSC }
 

Protected Member Functions

abstract void Banner ()
 
abstract void Usage ()
 
void DisplayBanner ()
 
void DisplayVersion ()
 
void DisplayVersions ()
 
void DisplayUsage ()
 
void Help ()
 
void Usage_Common (bool includeAuthOptions)
 
bool StartupCommon (string[] args, bool start_without_arguments=false, BlockingCollection< DirectDevice.IncomingEvent > eventQueue=null)
 
virtual bool OnParseArg (int c, string arg)
 
virtual bool AfterParseArgs (string[] args, int optind)
 
virtual void OverrideArgsOptions (ref List< LongOpt > options)
 
virtual void OverrideArgsString (ref string optstring)
 
bool ParseArgs (string[] args)
 
int CleanupCommon (ExitCode exitCode)
 

Static Protected Member Functions

static int Exit (ExitCode exitCode)
 

Protected Attributes

bool doBenchmark = false
 
bool quiet = false
 
DirectDevice.ListMode listMode = DirectDevice.ListMode.UsbDirect
 
bool listDevices = false
 
int deviceIndex = 0
 
string configFileName = "springcore.cfg"
 
CfgFile configFile
 
bool showDeviceDetails = false
 
bool dontDetectCompanion = false
 
bool dontDetectDevice = false
 
bool authUser = false
 
bool authAdmin = false
 
bool parse_only = false
 
byte[] authKey = null
 
DirectDevice device
 
string wildcard
 
string SuccessMessage = "Success"
 
string FailedMessage = "Failed"
 
AccessMode accessMode = AccessMode.Direct
 

Detailed Description

Features that are common to all SpringCoreTools command-line utilities.

Member Enumeration Documentation

◆ ExitCode [1/3]

Error codes returned by the utilities when exiting.

◆ ExitCode [2/3]

Error codes returned by the utilities when exiting.

◆ ExitCode [3/3]

Error codes returned by the utilities when exiting.


The documentation for this class was generated from the following files: