com.eurotech.framework.protocol.pcn
Class Pcn1001Master

java.lang.Object
  extended by com.eurotech.framework.protocol.pcn.Pcn1001Master
All Implemented Interfaces:
ConfigurableComponent, Pcn1001MasterService, org.osgi.service.event.EventHandler

public class Pcn1001Master
extends Object
implements Pcn1001MasterService, ConfigurableComponent, org.osgi.service.event.EventHandler

Defines PCN-1001 master class

Author:
ilya.binshtok

Field Summary
 
Fields inherited from interface com.eurotech.framework.protocol.pcn.Pcn1001MasterService
SERVICE_NAME
 
Constructor Summary
Pcn1001Master()
           
 
Method Summary
protected  void activate(org.osgi.service.component.ComponentContext componentContext, Map<String,Object> properties)
           
protected  void deactivate(org.osgi.service.component.ComponentContext componentContext)
           
 Pcn1001CountInfoService[] enableDisablePcn1001Counting(byte enOpcode)
          Enables/disables counting on all functional devices.
 Pcn1001Service[] getAllFunctionalCounters(boolean verifyFunctionality)
          Sends SNP polls to all configured passenger counters and reports all functional units.
 Pcn1001AddressInfoService[] getPcn1001AddressInfo()
          Obtains and reports PCN-1001 address information from all functional devices.
 Pcn1001CountInfoService[] getPcn1001CountInfo()
          Obtains and reports PCN-1001 IN/OUT count information from all functional devices.
 Pcn1001InfoService[] getPcn1001Info()
          Obtains and reports PCN-1001 information from all functional devices.
 Pcn1001InputLineInfoService[] getPcn1001InputLineInfo()
          Obtains and reports PCN-1001 input line information from all functional devices.
 Pcn1001CountInfoService[] getPcn1001LastCountInfo()
          Returns last read CountInfo.
 Pcn1001MasterConfig getPcn1001MasterConfig()
          Reports PCN-1001 Master configuration.
 Pcn1001VersionInfoService[] getPcn1001VersionInfo()
          Obtains and reports PCN-1001 version information.
 void handleEvent(org.osgi.service.event.Event event)
           
protected  boolean initializePcn1001Master()
           
 boolean isPcn1001MasterReady()
          Reports id PCN-1001 master is ready.
protected  boolean pcn1001PollInOutCounters()
           
 void registerListener(Pcn1001CountListenerService listener)
          registers a listener with the IPcn1001CountListener
 Pcn1001CountInfoService[] resetPcn1001Counts()
          Resets IN/OUT counts all functional devices.
 void setConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)
           
 void setPcn1001FactoryService(Pcn1001FactoryService pcn1001FactoryService)
           
 void setPcn1001SnpChannelAcquisitionService(Pcn1001SnpChannelAcquisitionService pcn1001SnpChannelAcquisitionService)
           
 void setSnpChannelProperties(Properties snpProperties)
           
 void setUsbService(UsbService usbService)
           
 void unregisterListener(Pcn1001CountListenerService listener)
          unregisters a listener with the IPcn1001CountListener
 void unsetConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)
           
 void unsetUsbService(UsbService usbService)
           
 void updated(Map<String,Object> properties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pcn1001Master

public Pcn1001Master()
Method Detail

setPcn1001FactoryService

public void setPcn1001FactoryService(Pcn1001FactoryService pcn1001FactoryService)

setPcn1001SnpChannelAcquisitionService

public void setPcn1001SnpChannelAcquisitionService(Pcn1001SnpChannelAcquisitionService pcn1001SnpChannelAcquisitionService)

setConnectionFactory

public void setConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)

unsetConnectionFactory

public void unsetConnectionFactory(org.osgi.service.io.ConnectionFactory connectionFactory)

setUsbService

public void setUsbService(UsbService usbService)

unsetUsbService

public void unsetUsbService(UsbService usbService)

activate

protected void activate(org.osgi.service.component.ComponentContext componentContext,
                        Map<String,Object> properties)

deactivate

protected void deactivate(org.osgi.service.component.ComponentContext componentContext)

updated

public void updated(Map<String,Object> properties)

setSnpChannelProperties

public void setSnpChannelProperties(Properties snpProperties)
Specified by:
setSnpChannelProperties in interface Pcn1001MasterService

getPcn1001LastCountInfo

public Pcn1001CountInfoService[] getPcn1001LastCountInfo()
Description copied from interface: Pcn1001MasterService
Returns last read CountInfo.

Specified by:
getPcn1001LastCountInfo in interface Pcn1001MasterService
Returns:

pcn1001PollInOutCounters

protected boolean pcn1001PollInOutCounters()

handleEvent

public void handleEvent(org.osgi.service.event.Event event)
Specified by:
handleEvent in interface org.osgi.service.event.EventHandler

getAllFunctionalCounters

public Pcn1001Service[] getAllFunctionalCounters(boolean verifyFunctionality)
Description copied from interface: Pcn1001MasterService
Sends SNP polls to all configured passenger counters and reports all functional units.

Specified by:
getAllFunctionalCounters in interface Pcn1001MasterService
Parameters:
verifyFunctionality - - verify functionality with SNP poll as boolean
Returns:
an array of functional PCN-1001 objects as IPcn1001Service[]

getPcn1001AddressInfo

public Pcn1001AddressInfoService[] getPcn1001AddressInfo()
Description copied from interface: Pcn1001MasterService
Obtains and reports PCN-1001 address information from all functional devices.

Specified by:
getPcn1001AddressInfo in interface Pcn1001MasterService
Returns:
PCN-1001 address information as IPcn1001AddressInfoService[]

getPcn1001VersionInfo

public Pcn1001VersionInfoService[] getPcn1001VersionInfo()
Description copied from interface: Pcn1001MasterService
Obtains and reports PCN-1001 version information.

Specified by:
getPcn1001VersionInfo in interface Pcn1001MasterService
Returns:
PCN-1001 version information as IPcn1001VersionInfoService[]

getPcn1001CountInfo

public Pcn1001CountInfoService[] getPcn1001CountInfo()
Description copied from interface: Pcn1001MasterService
Obtains and reports PCN-1001 IN/OUT count information from all functional devices.

Specified by:
getPcn1001CountInfo in interface Pcn1001MasterService
Returns:
PCN-1001 IN/OUT count information as IPcn1001CountInfoService[]

getPcn1001InputLineInfo

public Pcn1001InputLineInfoService[] getPcn1001InputLineInfo()
Description copied from interface: Pcn1001MasterService
Obtains and reports PCN-1001 input line information from all functional devices.

Specified by:
getPcn1001InputLineInfo in interface Pcn1001MasterService
Returns:
PCN-1001 input line information as IPcn1001InputLineInfoService[]

getPcn1001Info

public Pcn1001InfoService[] getPcn1001Info()
Description copied from interface: Pcn1001MasterService
Obtains and reports PCN-1001 information from all functional devices.

Specified by:
getPcn1001Info in interface Pcn1001MasterService
Returns:
PCN-1001 information as IPcn1001InfoService[]

resetPcn1001Counts

public Pcn1001CountInfoService[] resetPcn1001Counts()
Description copied from interface: Pcn1001MasterService
Resets IN/OUT counts all functional devices.

Specified by:
resetPcn1001Counts in interface Pcn1001MasterService
Returns:
PCN-1001 IN/OUT count information after reset as IPcn1001CountInfoService[]

enableDisablePcn1001Counting

public Pcn1001CountInfoService[] enableDisablePcn1001Counting(byte enOpcode)
Description copied from interface: Pcn1001MasterService
Enables/disables counting on all functional devices.

Specified by:
enableDisablePcn1001Counting in interface Pcn1001MasterService
Parameters:
enOpcode - - enable/disable opcode as byte
Returns:
PCN-1001 IN/OUT count information after reset as IPcn1001CountInfoService[]

isPcn1001MasterReady

public boolean isPcn1001MasterReady()
Description copied from interface: Pcn1001MasterService
Reports id PCN-1001 master is ready.

Specified by:
isPcn1001MasterReady in interface Pcn1001MasterService
Returns:
boolean

getPcn1001MasterConfig

public Pcn1001MasterConfig getPcn1001MasterConfig()
Reports PCN-1001 Master configuration.

Specified by:
getPcn1001MasterConfig in interface Pcn1001MasterService
Returns:
PCN-1001 Master configuration as Pcn1001MasterConfig

initializePcn1001Master

protected boolean initializePcn1001Master()

registerListener

public void registerListener(Pcn1001CountListenerService listener)
Description copied from interface: Pcn1001MasterService
registers a listener with the IPcn1001CountListener

Specified by:
registerListener in interface Pcn1001MasterService
Parameters:
listener - the IPcn1001CountListener to register

unregisterListener

public void unregisterListener(Pcn1001CountListenerService listener)
Description copied from interface: Pcn1001MasterService
unregisters a listener with the IPcn1001CountListener

Specified by:
unregisterListener in interface Pcn1001MasterService
Parameters:
listener - the IPcn1001CountListener to unregister


Copyright © 2013. All Rights Reserved.