|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eurotech.framework.protocol.pcn.Pcn1001
public class Pcn1001
Defines Pcn1001 - passenger counter class.
Field Summary |
---|
Fields inherited from interface com.eurotech.framework.protocol.pcn.Pcn1001Service |
---|
DFLT_NUM_RETRIES, DFLT_SNP_CMD_TOUT, DFLT_SNP_POLL_TOUT, DISABLE_AUTOLED_OPCODE, DISABLE_COUNTING_OPCODE, DISABLE_DIAGNOSTICS_OPCODE, ENABLE_AUTOLED_OPCODE, ENABLE_COUNTING_OPCODE, ENABLE_DIAGNOSTICS_OPCODE, htCommSerialMode, htEnableDisableAutoLed, htEnableDisableCounting, htEnableDisableDiagnostics, htOptInFunction, OPTINP_CNT_ENABLE_DISABLE_OPCODE, OPTINP_CNT_RESET_OPCODE, OPTINP_DISABLED_OPCODE, OPTINP0, OPTINP1, OPTOUT_MAX_VALUE, OPTOUT_MIN_VALUE, OPTOUT0, OPTOUT1, SERVICE_NAME |
Constructor Summary | |
---|---|
Pcn1001(int snpAddress,
Pcn1001SnpChannelService snpChannelService)
Pcn1001 constructor |
|
Pcn1001(Pcn1001AddressInfoService addressInfoService)
Pcn1001 - copy constructor. |
|
Pcn1001(Pcn1001CountInfoService countInfoService)
Pcn1001 - copy constructor. |
|
Pcn1001(Pcn1001InfoService infoService)
Pcn1001 - copy constructor. |
|
Pcn1001(Pcn1001VersionInfoService versionInfoService)
Pcn1001 - copy constructor. |
Method Summary | |
---|---|
void |
clearReplyErrors()
Clears the number of reply errors and communication errors |
void |
enableDisableAutoLed(byte opcode)
|
void |
enableDisableCounting(byte opcode)
Enables/disables counting. |
void |
enableDisableDiagnostics(byte opcode)
Enables/disables diagnostics. |
long |
getCommunicationErrors()
Reports the number of communication errors. |
Calendar |
getDateAndTime()
Reports date and time |
int |
getDiagnosticStatus()
Reports the diagnostic status. |
String |
getFpgaFirmwareVersion()
Reports PCN-1001 FPGA firmware version. |
String |
getImgServerVersion()
Reports PCN-1001 counting software version. |
int |
getInCount()
Reports current value of IN counter. |
String |
getKernelVersion()
Reports PCN-1001 kernel version. |
String |
getOsVersion()
Reports PCN-1001 operating system version. |
int |
getOutCount()
Reports current value of OUT counter. |
long |
getReplyErrors()
Reports the number of reply errors. |
int |
getSnpAddress()
Reports SNP address assigned to the counter. |
int |
getSnpCmdTimeout()
Reports SNP command timeout in milliseconds. |
int |
getSnpNumRetries()
|
int |
getSnpPollTimeout()
Reports SNP poll timeout in milliseconds. |
boolean |
isAutoLedEnabled()
Reports if 'autoled' functionality is enabled. |
boolean |
isCountingEnabled()
Reports if counting is enabled. |
boolean |
isDiagnosticsEnabled()
Reports if diagnostics is enabled. |
boolean |
isFunctional()
Reports if passenger counter is accessible via SNP protocol by sending a poll to it and obtaining a reply. |
boolean |
isInput0Level()
Reports the status of input0 line |
boolean |
isInput1Level()
Reports the status of input1 line |
boolean |
isSnpDisabled()
Reports the status of SNP communication |
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 |
setInCount(int inCount)
Sets IN count. |
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 |
setOutCount(int outCount)
Sets OUT count. |
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 class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pcn1001(int snpAddress, Pcn1001SnpChannelService snpChannelService)
snpAddress
- - SNP address of the counter as int
snpChannelService
- - SNP channel service as
IPcn1001SnpChannelService
bootstrapService
- - bootstrap service as IBootstrapService
esfLoggerService
- - ESF logger service as IEsfLoggerService
public Pcn1001(Pcn1001InfoService infoService)
infoService
- PCN-1001 info service as IPcn1001InfoService
public Pcn1001(Pcn1001CountInfoService countInfoService)
countInfoService
- - PCN-1001 IN/OUT count information as
IPcn1001CountInfoService
public Pcn1001(Pcn1001VersionInfoService versionInfoService)
versionInfoService
- - PCN-1001 version service as
IPcn1001VersionInfoService
public Pcn1001(Pcn1001AddressInfoService addressInfoService)
addressInfoService
- - PCN-1001 address info service as
IPcn1001AddressInfoService
Method Detail |
---|
public int getSnpPollTimeout()
Pcn1001Service
getSnpPollTimeout
in interface Pcn1001Service
int
public void setSnpPollTimeout(int snpPollTimeout)
Pcn1001Service
setSnpPollTimeout
in interface Pcn1001Service
snpPollTimeout
- - SNP poll timeout as int
public int getSnpCmdTimeout()
Pcn1001Service
getSnpCmdTimeout
in interface Pcn1001Service
int
public void setSnpCmdTimeout(int snpCmdTimeout)
Pcn1001Service
setSnpCmdTimeout
in interface Pcn1001Service
snpCmdTimeout
- - SNP command timeout as int
public int getSnpAddress()
Pcn1001AddressInfoService
getSnpAddress
in interface Pcn1001AddressInfoService
getSnpAddress
in interface Pcn1001CountInfoService
int
public String getKernelVersion()
Pcn1001VersionInfoService
getKernelVersion
in interface Pcn1001VersionInfoService
String
public String getOsVersion()
Pcn1001VersionInfoService
getOsVersion
in interface Pcn1001VersionInfoService
String
public String getFpgaFirmwareVersion()
Pcn1001VersionInfoService
getFpgaFirmwareVersion
in interface Pcn1001VersionInfoService
String
public String getImgServerVersion()
Pcn1001VersionInfoService
getImgServerVersion
in interface Pcn1001VersionInfoService
String
public int getInCount()
Pcn1001CountInfoService
getInCount
in interface Pcn1001CountInfoService
int
public void setInCount(int inCount)
Pcn1001CountInfoService
setInCount
in interface Pcn1001CountInfoService
inCount
- - IN count as int
public Calendar getDateAndTime()
Pcn1001DateAndTimeService
getDateAndTime
in interface Pcn1001DateAndTimeService
Calendar
public boolean isInput0Level()
Pcn1001InputLineInfoService
isInput0Level
in interface Pcn1001InputLineInfoService
boolean
public boolean isInput1Level()
Pcn1001InputLineInfoService
isInput1Level
in interface Pcn1001InputLineInfoService
boolean
public int getOutCount()
Pcn1001CountInfoService
getOutCount
in interface Pcn1001CountInfoService
int
public void setOutCount(int outCount)
Pcn1001CountInfoService
setOutCount
in interface Pcn1001CountInfoService
outCount
- - OUT count as int
public boolean isCountingEnabled()
Pcn1001CountInfoService
isCountingEnabled
in interface Pcn1001CountInfoService
boolean
public boolean isAutoLedEnabled()
Pcn1001CountInfoService
isAutoLedEnabled
in interface Pcn1001CountInfoService
boolean
public boolean isDiagnosticsEnabled()
Pcn1001CountInfoService
isDiagnosticsEnabled
in interface Pcn1001CountInfoService
boolean
public long getReplyErrors()
Pcn1001CountInfoService
getReplyErrors
in interface Pcn1001CountInfoService
long
public long getCommunicationErrors()
Pcn1001CountInfoService
getCommunicationErrors
in interface Pcn1001CountInfoService
long
public boolean isSnpDisabled()
Pcn1001CountInfoService
isSnpDisabled
in interface Pcn1001CountInfoService
boolean
public void clearReplyErrors()
Pcn1001Service
clearReplyErrors
in interface Pcn1001Service
public int getDiagnosticStatus()
Pcn1001CountInfoService
getDiagnosticStatus
in interface Pcn1001CountInfoService
int
public boolean isFunctional() throws EsfException
Pcn1001Service
isFunctional
in interface Pcn1001Service
boolean
EsfException
public void obtainKernelVersion() throws EsfException
Pcn1001Service
obtainKernelVersion
in interface Pcn1001Service
EsfException
public void obtainOsVersion() throws EsfException
Pcn1001Service
obtainOsVersion
in interface Pcn1001Service
EsfException
public void obtainFpgaFirmwareVersion() throws EsfException
Pcn1001Service
obtainFpgaFirmwareVersion
in interface Pcn1001Service
EsfException
public void obtainImgServerVersion() throws EsfException
Pcn1001Service
obtainImgServerVersion
in interface Pcn1001Service
EsfException
public void obtainInOutCounters() throws EsfException
Pcn1001Service
obtainInOutCounters
in interface Pcn1001Service
EsfException
public void resetInOutCounters(boolean verifyReset) throws EsfException
Pcn1001Service
resetInOutCounters
in interface Pcn1001Service
verifyReset
- - verify reset with 'gcounters' command as boolean
EsfException
public void enableDisableCounting(byte opcode) throws EsfException
Pcn1001Service
enableDisableCounting
in interface Pcn1001Service
opcode
- - enable/disable opcode as byte
EsfException
public void enableDisableAutoLed(byte opcode) throws EsfException
enableDisableAutoLed
in interface Pcn1001Service
EsfException
public void setLedLightIntensity(int lightIntensity) throws EsfException
Pcn1001Service
setLedLightIntensity
in interface Pcn1001Service
lightIntensity
- - LED light intensity (from 0 to 255) as int
EsfException
public void setIpAddress(String ipAddress) throws EsfException
Pcn1001Service
setIpAddress
in interface Pcn1001Service
ipAddress
- - IP address as String
EsfException
public void setInputLine(int line, short function) throws EsfException
Pcn1001Service
setInputLine
in interface Pcn1001Service
line
- - digital input line as int
function
- - function of digital input line as int
EsfException
public void setOutputOpenTime(int line, short openTime) throws EsfException
Pcn1001Service
setOutputOpenTime
in interface Pcn1001Service
line
- - digital output line as int
openTime
- - open time (range 8~1020, must be multiple of 4) as short
EsfException
public void obtainDateAndTime() throws EsfException
Pcn1001Service
obtainDateAndTime
in interface Pcn1001Service
EsfException
public void setDateAndTime(Calendar calendar) throws EsfException
Pcn1001Service
setDateAndTime
in interface Pcn1001Service
calendar
- - date and time information as Calendar
EsfException
public void obtainInputLineLevel(int line) throws EsfException
Pcn1001Service
obtainInputLineLevel
in interface Pcn1001Service
line
- - digital input line as int
EsfException
public void enableDisableDiagnostics(byte opcode) throws EsfException
Pcn1001Service
enableDisableDiagnostics
in interface Pcn1001Service
EsfException
public void obtainDiagnosticStatus() throws EsfException
Pcn1001Service
obtainDiagnosticStatus
in interface Pcn1001Service
EsfException
public int getSnpNumRetries()
getSnpNumRetries
in interface Pcn1001Service
public void setSnpNumRetries(int snpNumRetries)
Pcn1001Service
setSnpNumRetries
in interface Pcn1001Service
snpNumRetries
- - SNP number of retries as int
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |