com.eurotech.framework.protocol.pcn
Interface Pcn1001Service

All Superinterfaces:
Pcn1001AddressInfoService, Pcn1001CountInfoService, Pcn1001DateAndTimeService, Pcn1001InfoService, Pcn1001InputLineInfoService, Pcn1001VersionInfoService
All Known Implementing Classes:
Pcn1001

public interface Pcn1001Service
extends Pcn1001InfoService

Defines IPcn1001Service - passenger counter service.

Author:
ilya.binshtok

Field Summary
static int DFLT_NUM_RETRIES
          Default value SNP number of retries
static int DFLT_SNP_CMD_TOUT
          Default value SNP command timeout in msec
static int DFLT_SNP_POLL_TOUT
          Default value for SNP poll timeout in msec
static byte DISABLE_AUTOLED_OPCODE
          'Disable autoled' opcode
static byte DISABLE_COUNTING_OPCODE
          'Disable Counting' opcode
static byte DISABLE_DIAGNOSTICS_OPCODE
          'Disable diagnostic' opcode
static byte ENABLE_AUTOLED_OPCODE
          'Enable autoled' opcode
static byte ENABLE_COUNTING_OPCODE
          'Enable Counting' opcode
static byte ENABLE_DIAGNOSTICS_OPCODE
          'Enable diagnostic' opcode
static Hashtable htCommSerialMode
           
static Hashtable htEnableDisableAutoLed
           
static Hashtable htEnableDisableCounting
           
static Hashtable htEnableDisableDiagnostics
           
static Hashtable htOptInFunction
          Hash tables that describe operation codes
static short OPTINP_CNT_ENABLE_DISABLE_OPCODE
           
static short OPTINP_CNT_RESET_OPCODE
           
static short OPTINP_DISABLED_OPCODE
          Digital input functionality 0 - disabled 1 - reset IN/OUT counts 2 - enable/disable counting
static int OPTINP0
          Digital inputs (input0/1)
static int OPTINP1
           
static int OPTOUT_MAX_VALUE
           
static int OPTOUT_MIN_VALUE
           
static int OPTOUT0
          Digital outputs open time (outtime0/1)
static int OPTOUT1
           
static String SERVICE_NAME
          name of this service
 
Method Summary
 void clearReplyErrors()
          Clears the number of reply errors and communication errors
 void enableDisableAutoLed(byte opcode)
           
 void enableDisableCounting(byte enOpcode)
          Enables/disables counting.
 void enableDisableDiagnostics(byte opcode)
          Enables/disables diagnostics.
 int getSnpCmdTimeout()
          Reports SNP command timeout in milliseconds.
 int getSnpNumRetries()
           
 int getSnpPollTimeout()
          Reports SNP poll timeout in milliseconds.
 boolean isFunctional()
          Reports if passenger counter is accessible via SNP protocol by sending a poll to it and obtaining a reply.
 void obtainDateAndTime()
          Obtains date and time information.
 void obtainDiagnosticStatus()
          Obtains diagnostic status.
 void obtainFpgaFirmwareVersion()
          Obtains PCN-1001 FPGA firmware version.
 void obtainImgServerVersion()
          Obtains PCN-1001 counting software version.
 void obtainInOutCounters()
          Obtains IN/OUT counters.
 void obtainInputLineLevel(int line)
          Obtains level of specified Input Line.
 void obtainKernelVersion()
          Obtains kernel version from passenger counter
 void obtainOsVersion()
          Obtains PCN-1001 operating system version.
 void resetInOutCounters(boolean verifyReset)
          Resets IN/OUT counters.
 void setDateAndTime(Calendar calendar)
          Sets date and time information.
 void setInputLine(int line, short function)
          Sets function of digital input line specified.
 void setIpAddress(String ipAddress)
          Sets IP address.
 void setLedLightIntensity(int lightIntensity)
          Sets LED light intensity.
 void setOutputOpenTime(int line, short openTime)
          Sets open time for specified optocoupled output
 void setSnpCmdTimeout(int snpCmdTimeout)
          Sets SNP command timeout in milliseconds.
 void setSnpNumRetries(int snpNumRetries)
          Sets SNP number of retries before disabling
 void setSnpPollTimeout(int snpPollTimeout)
          Sets SNP poll timeout in milliseconds.
 
Methods inherited from interface com.eurotech.framework.protocol.pcn.Pcn1001VersionInfoService
getFpgaFirmwareVersion, getImgServerVersion, getKernelVersion, getOsVersion
 
Methods inherited from interface com.eurotech.framework.protocol.pcn.Pcn1001CountInfoService
getCommunicationErrors, getDiagnosticStatus, getInCount, getOutCount, getReplyErrors, getSnpAddress, isAutoLedEnabled, isCountingEnabled, isDiagnosticsEnabled, isSnpDisabled, setInCount, setOutCount
 
Methods inherited from interface com.eurotech.framework.protocol.pcn.Pcn1001InputLineInfoService
isInput0Level, isInput1Level
 
Methods inherited from interface com.eurotech.framework.protocol.pcn.Pcn1001DateAndTimeService
getDateAndTime
 
Methods inherited from interface com.eurotech.framework.protocol.pcn.Pcn1001AddressInfoService
getSnpAddress
 

Field Detail

SERVICE_NAME

static final String SERVICE_NAME
name of this service


DFLT_SNP_POLL_TOUT

static final int DFLT_SNP_POLL_TOUT
Default value for SNP poll timeout in msec

See Also:
Constant Field Values

DFLT_SNP_CMD_TOUT

static final int DFLT_SNP_CMD_TOUT
Default value SNP command timeout in msec

See Also:
Constant Field Values

DFLT_NUM_RETRIES

static final int DFLT_NUM_RETRIES
Default value SNP number of retries

See Also:
Constant Field Values

DISABLE_COUNTING_OPCODE

static final byte DISABLE_COUNTING_OPCODE
'Disable Counting' opcode

See Also:
Constant Field Values

ENABLE_COUNTING_OPCODE

static final byte ENABLE_COUNTING_OPCODE
'Enable Counting' opcode

See Also:
Constant Field Values

DISABLE_AUTOLED_OPCODE

static final byte DISABLE_AUTOLED_OPCODE
'Disable autoled' opcode

See Also:
Constant Field Values

ENABLE_AUTOLED_OPCODE

static final byte ENABLE_AUTOLED_OPCODE
'Enable autoled' opcode

See Also:
Constant Field Values

OPTINP0

static final int OPTINP0
Digital inputs (input0/1)

See Also:
Constant Field Values

OPTINP1

static final int OPTINP1
See Also:
Constant Field Values

OPTINP_DISABLED_OPCODE

static final short OPTINP_DISABLED_OPCODE
Digital input functionality 0 - disabled 1 - reset IN/OUT counts 2 - enable/disable counting

See Also:
Constant Field Values

OPTINP_CNT_RESET_OPCODE

static final short OPTINP_CNT_RESET_OPCODE
See Also:
Constant Field Values

OPTINP_CNT_ENABLE_DISABLE_OPCODE

static final short OPTINP_CNT_ENABLE_DISABLE_OPCODE
See Also:
Constant Field Values

DISABLE_DIAGNOSTICS_OPCODE

static final byte DISABLE_DIAGNOSTICS_OPCODE
'Disable diagnostic' opcode

See Also:
Constant Field Values

ENABLE_DIAGNOSTICS_OPCODE

static final byte ENABLE_DIAGNOSTICS_OPCODE
'Enable diagnostic' opcode

See Also:
Constant Field Values

htOptInFunction

static final Hashtable htOptInFunction
Hash tables that describe operation codes


htEnableDisableCounting

static final Hashtable htEnableDisableCounting

htEnableDisableDiagnostics

static final Hashtable htEnableDisableDiagnostics

htEnableDisableAutoLed

static final Hashtable htEnableDisableAutoLed

htCommSerialMode

static final Hashtable htCommSerialMode

OPTOUT0

static final int OPTOUT0
Digital outputs open time (outtime0/1)

See Also:
Constant Field Values

OPTOUT1

static final int OPTOUT1
See Also:
Constant Field Values

OPTOUT_MIN_VALUE

static final int OPTOUT_MIN_VALUE
See Also:
Constant Field Values

OPTOUT_MAX_VALUE

static final int OPTOUT_MAX_VALUE
See Also:
Constant Field Values
Method Detail

getSnpPollTimeout

int getSnpPollTimeout()
Reports SNP poll timeout in milliseconds.

Returns:
SNP poll timeout as int

setSnpPollTimeout

void setSnpPollTimeout(int snpPollTimeout)
Sets SNP poll timeout in milliseconds.

Parameters:
snpPollTimeout - - SNP poll timeout as int

getSnpCmdTimeout

int getSnpCmdTimeout()
Reports SNP command timeout in milliseconds.

Returns:
SNP command timeout as int

setSnpCmdTimeout

void setSnpCmdTimeout(int snpCmdTimeout)
Sets SNP command timeout in milliseconds.

Parameters:
snpCmdTimeout - - SNP command timeout as int

getSnpNumRetries

int getSnpNumRetries()

setSnpNumRetries

void setSnpNumRetries(int snpNumRetries)
Sets SNP number of retries before disabling

Parameters:
snpNumRetries - - SNP number of retries as int

isFunctional

boolean isFunctional()
                     throws EsfException
Reports if passenger counter is accessible via SNP protocol by sending a poll to it and obtaining a reply.

Returns:
boolean
Throws:
EsfException

obtainKernelVersion

void obtainKernelVersion()
                         throws EsfException
Obtains kernel version from passenger counter

Throws:
EsfException

obtainOsVersion

void obtainOsVersion()
                     throws EsfException
Obtains PCN-1001 operating system version.

Throws:
EsfException

obtainFpgaFirmwareVersion

void obtainFpgaFirmwareVersion()
                               throws EsfException
Obtains PCN-1001 FPGA firmware version.

Throws:
EsfException

obtainImgServerVersion

void obtainImgServerVersion()
                            throws EsfException
Obtains PCN-1001 counting software version.

Throws:
EsfException

obtainInOutCounters

void obtainInOutCounters()
                         throws EsfException
Obtains IN/OUT counters.

Throws:
EsfException

resetInOutCounters

void resetInOutCounters(boolean verifyReset)
                        throws EsfException
Resets IN/OUT counters.

Parameters:
verifyReset - - verify reset with 'gcounters' command as boolean
Throws:
EsfException

enableDisableCounting

void enableDisableCounting(byte enOpcode)
                           throws EsfException
Enables/disables counting.

Parameters:
enOpcode - - enable/disable opcode as byte
Throws:
EsfException

enableDisableAutoLed

void enableDisableAutoLed(byte opcode)
                          throws EsfException
Throws:
EsfException

enableDisableDiagnostics

void enableDisableDiagnostics(byte opcode)
                              throws EsfException
Enables/disables diagnostics.

Parameters:
enOpcode - - enable/disable opcode as byte
Throws:
EsfException

setInputLine

void setInputLine(int line,
                  short function)
                  throws EsfException
Sets function of digital input line specified.

Parameters:
line - - digital input line as int
function - - function of digital input line as int
Throws:
EsfException

setOutputOpenTime

void setOutputOpenTime(int line,
                       short openTime)
                       throws EsfException
Sets open time for specified optocoupled output

Parameters:
line - - digital output line as int
openTime - - open time (range 8~1020, must be multiple of 4) as short
Throws:
EsfException

setLedLightIntensity

void setLedLightIntensity(int lightIntensity)
                          throws EsfException
Sets LED light intensity.

Parameters:
lightIntensity - - LED light intensity (from 0 to 255) as int
Throws:
EsfException

setIpAddress

void setIpAddress(String ipAddress)
                  throws EsfException
Sets IP address.

Parameters:
ipAddress - - IP address as String
Throws:
EsfException

obtainInputLineLevel

void obtainInputLineLevel(int line)
                          throws EsfException
Obtains level of specified Input Line.

Parameters:
line - - digital input line as int
Throws:
EsfException

obtainDateAndTime

void obtainDateAndTime()
                       throws EsfException
Obtains date and time information.

Throws:
EsfException

obtainDiagnosticStatus

void obtainDiagnosticStatus()
                            throws EsfException
Obtains diagnostic status.

Throws:
EsfException

setDateAndTime

void setDateAndTime(Calendar calendar)
                    throws EsfException
Sets date and time information.

Parameters:
calendar - - date and time information as Calendar
Throws:
EsfException

clearReplyErrors

void clearReplyErrors()
Clears the number of reply errors and communication errors



Copyright © 2013. All Rights Reserved.