AP&C API Reference
Protected Member Functions | Properties | List of all members
Apac.Dallas.OneWire.Control.OneWireController Class Reference

The controlling component for communicating with 1-Wire networks. This component handles network level calls and delegates session level calls to individual 1-Wire device code modules (based on family code). More...

Inheritance diagram for Apac.Dallas.OneWire.Control.OneWireController:
Apac.Control.ThreadedPollingController Apac.LicensedSupervisable Apac.Control.IController Apac.Supervisable Apac.ISupervisable

Protected Member Functions

override void OnInitialize (Apac.Configuration.SupervisableConfig config)
 Called when the supervisable component is intitialized. More...
 
override void OnStarting ()
 Called when starting, allows the subclass to perform startup tasks. More...
 
override void OnStopping ()
 Called when stopping, allows the subclass to perform shutdown tasks. More...
 
override Apac.Monitoring.Readings OnPollReadings (DateTime mark)
 Called when it is time to poll the readings, allows the subclass to implement detailed procedures for communicating with different devices. More...
 
override void OnPerformPollEnding ()
 Called when the method that performs the polling is ending, allows the subclass to handle any resources used during polling. This is called from the 'finally' block so it will happen if an exception triggers the method to end. More...
 
override ulong[] OnGetSensorIds ()
 Called when the sensor identifiers are neededd. More...
 
- Protected Member Functions inherited from Apac.Control.ThreadedPollingController
override void OnResolveReferences ()
 Called when the supervisable component needs to resolve its runtime references to other components. More...
 
override void OnCheckReferencesStates ()
 Called when the supervisable component needs to check the state of its runtime reference components. More...
 
override void OnInitialize (Apac.Configuration.SupervisableConfig config)
 Called when the supervisable component is intitialized. More...
 
override void OnStart ()
 Called when starting. More...
 
override void OnStop ()
 Called when stopping. More...
 
- Protected Member Functions inherited from Apac.LicensedSupervisable
AcquisitionResponse CheckLicense ()
 Checks the license. More...
 
ReleaseResponse ReleaseLicense ()
 Releases the license. More...
 
virtual void Dispose (bool cleanUpManagedObjects)
 Releases unmanaged and - optionally - managed resources. More...
 
- Protected Member Functions inherited from Apac.Supervisable
virtual void OnStateChanging (SupervisableState currentState, SupervisableState newState)
 Call chain for state changing notification. More...
 
virtual void OnStateChanged (SupervisableState previousState, SupervisableState newState)
 Call chain for state changed notification. More...
 
virtual void OnException (Exception ex)
 Call chain for exception notification. More...
 
void SetState (SupervisableState newState)
 Changes the state of the controller to the new state. More...
 
virtual void OnStateChangeStarting ()
 
virtual void OnStateChangeRunning ()
 
virtual void OnStateChangeStopping ()
 
virtual void OnStateChangeStopped ()
 
virtual void OnStateChangeInitializing ()
 
virtual void OnStateChangeInitialized ()
 
virtual void OnStateChangeErrored ()
 
virtual void OnStateChangeImpaired ()
 
void HandleException (string message, Exception e)
 Deals with the details of handling exceptions captured by the controller. More...
 
void ResetException ()
 Allows subclasses to reset the last exception to an empty state. More...
 
void HandleImpairment (string message, Exception e)
 Deals with the details of handling non-critical problems captured by the controller. More...
 

Properties

override Apac.Licensing.LicensedFeatures Features [get]
 Gets the features. More...
 
override int NumReadings [get]
 Gets the num readings expected by the subclass. More...
 
- Properties inherited from Apac.Control.ThreadedPollingController
abstract int NumReadings [get]
 Gets the num readings expected by the subclass. More...
 
ulong[] SensorIds [get]
 Gets the identification numbers of the sensors that are actively available to the controller. This helps with system discovery and setup. More...
 
ushort Resolution [get]
 Gets the resolution value, not number of bits. IE: 4096 == 16 bits. More...
 
ushort PollFrequency [get]
 Gets the poll frequency (in seconds). More...
 
ushort DelayDuration [get]
 Gets the duration of the delay (in milliseconds). More...
 
- Properties inherited from Apac.LicensedSupervisable
abstract LicensedFeatures Features [get]
 Gets the licensed features used by this component. See the LicensedFeatures flags enumeration. More...
 
AcquisitionResponse LicenseResponse [get]
 Gets the license response previously obtained with CheckLicense(). More...
 
- Properties inherited from Apac.Supervisable
string Name [get]
 Gets the name of the controller, as specified by configuration. Note that if the name is not specified, then an index will be used. More...
 
string Description [get]
 Gets the description of the controller, as specified by configuration. More...
 
bool Prioritized [get]
 Indicates if the supervisable component should be executed on a higher thread priority. More...
 
DateTime LastHeartbeat [get]
 The time of the last heartbeat. More...
 
Supervisors.ISupervisor ExecutiveSupervisor [get]
 Walks the tree to find the top level supervisor. More...
 
bool IsRunning [get]
 Gets a value indicating whether this instance is running. More...
 
SupervisableState CurrentState [get]
 Gets the current overall state of the controller. More...
 
SupervisableState PreviousState [get]
 Gets the previous overall state of the controller. More...
 
Exception LastException [get]
 Gets the last exception encountered within the controller. More...
 
DateTime StartTime [get]
 Gets the time this supervisable component was started. More...
 
DateTime StopTime [get]
 Gets the time this supervisable component was stopped. More...
 
TimeSpan UpTime [get]
 Gets the amount of time this supervisable component has been running, or did run before it was stopped (if IsRunning is false). More...
 
Supervisors.ISupervisor Supervisor [get]
 Gets the supervisor. More...
 
SupervisableConfig Config [get]
 The configuration object used by the supervisable component. More...
 
log4net.ILog Log [get]
 Lazy-initialized logger for subclass usage. More...
 
- Properties inherited from Apac.ISupervisable
string Name [get]
 The name of the component, for unique identification purposes. More...
 
string Description [get]
 The description of the component, for human consumption. More...
 
bool Prioritized [get]
 Indicates if the component should be high priority. More...
 
Supervisors.ISupervisor ExecutiveSupervisor [get]
 Walks the tree to find the top level supervisor. More...
 
bool IsRunning [get]
 Indicates that the component is running. More...
 
DateTime LastHeartbeat [get]
 
DateTime StartTime [get]
 Gets the time this supervisable component was started. More...
 
DateTime StopTime [get]
 Gets the time this supervisable component was stopped. More...
 
TimeSpan UpTime [get]
 Gets the amount of time this supervisable component has been running, or did run before it was stopped (if IsRunning is false). More...
 
SupervisableState CurrentState [get]
 Gets the current SupervisableState of this component. More...
 
SupervisableState PreviousState [get]
 Gets the previous SupervisableState of this component. More...
 
Exception LastException [get]
 Gets the last exception to have occurred and been trapped by this component. More...
 
- Properties inherited from Apac.Control.IController
ushort Resolution [get]
 Gets the resolution value, not number of bits. IE: 4096 == 16 bits. More...
 
ulong[] SensorIds [get]
 Gets the identification numbers of the sensors that are actively available to the controller. This helps with system discovery and setup. More...
 
ushort PollFrequency [get]
 Gets the poll frequency (in seconds). More...
 
ushort DelayDuration [get]
 Gets the duration of the delay (in milliseconds). More...
 

Additional Inherited Members

- Public Member Functions inherited from Apac.Control.ThreadedPollingController
virtual IEnumerable< ControllerDescriptorGetDescriptors ()
 Gets the descriptors for the controller, which might include more than one due to some architectures that can have more than one input board, or addressable source, for use during measurement configuration. More...
 
- Public Member Functions inherited from Apac.LicensedSupervisable
bool IsLicensed (LicensedFeatures feature)
 Checks to see if an individual feature is licensed, based on the stored response. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
- Public Member Functions inherited from Apac.Supervisable
void Initialize (Apac.Configuration.SupervisableConfig config, Supervisors.ISupervisor supervisor)
 Initializes the controller from configuration. More...
 
void ResolveReferences ()
 Resolves any references this component might hold to other supervisable components. More...
 
void CheckReferencesStates ()
 Checks the states of referenced components to be sure they are satisfactory for this component's operation. More...
 
void Starting ()
 Signals that the component will be starting on its own thread. This implementation uses this opportunity to CheckReferencesStates, change state to Starting, and signal subclasses with OnStarting. More...
 
void Start ()
 Starts the component. More...
 
void Stop ()
 Stops the component. More...
 
- Public Member Functions inherited from Apac.ISupervisable
void Initialize (Apac.Configuration.SupervisableConfig config, Supervisors.ISupervisor exec)
 Initializes the component with the given SupervisableConfig (or derivative) and ISupervisor. More...
 
- Events inherited from Apac.Supervisable
SupervisableStateChangingHandler SupervisableStateChanging
 Notifies listeners that the state is about to change. More...
 
SupervisableStateChangedHandler SupervisableStateChanged
 Notifies listeners that the state has changed. More...
 
SupervisableErroredHandler SupervisableErrored
 Notifies listeners that an error occured within the controller. More...
 
SupervisableHeartbeatHandler SupervisableHeartbeat
 Notifies listeners that the component is still active. More...
 
- Events inherited from Apac.ISupervisable
SupervisableStateChangingHandler SupervisableStateChanging
 Notifies listeners that the state is about to change. More...
 
SupervisableStateChangedHandler SupervisableStateChanged
 Notifies listeners that the state has changed. More...
 
SupervisableErroredHandler SupervisableErrored
 Notifies listeners that an error occured within the controller. More...
 
SupervisableHeartbeatHandler SupervisableHeartbeat
 Notifies listeners that the component is still active. More...
 

Detailed Description

The controlling component for communicating with 1-Wire networks. This component handles network level calls and delegates session level calls to individual 1-Wire device code modules (based on family code).

Member Function Documentation

◆ OnGetSensorIds()

override ulong [] Apac.Dallas.OneWire.Control.OneWireController.OnGetSensorIds ( )
inlineprotectedvirtual

Called when the sensor identifiers are neededd.

Returns
Returns a T:unlong[] containing all identifiers of available sensors (ports).

Implements Apac.Control.ThreadedPollingController.

◆ OnInitialize()

override void Apac.Dallas.OneWire.Control.OneWireController.OnInitialize ( Apac.Configuration.SupervisableConfig  config)
inlineprotectedvirtual

Called when the supervisable component is intitialized.

Parameters
configThe configuration to use for initialization.

Implements Apac.Supervisable.

◆ OnPerformPollEnding()

override void Apac.Dallas.OneWire.Control.OneWireController.OnPerformPollEnding ( )
inlineprotectedvirtual

Called when the method that performs the polling is ending, allows the subclass to handle any resources used during polling. This is called from the 'finally' block so it will happen if an exception triggers the method to end.

Implements Apac.Control.ThreadedPollingController.

◆ OnPollReadings()

override Apac.Monitoring.Readings Apac.Dallas.OneWire.Control.OneWireController.OnPollReadings ( DateTime  mark)
inlineprotectedvirtual

Called when it is time to poll the readings, allows the subclass to implement detailed procedures for communicating with different devices.

Parameters
markThe time marked for the poll. Most controllers won't need this, but it's good for mocking up data.
Returns

Implements Apac.Control.ThreadedPollingController.

◆ OnStarting()

override void Apac.Dallas.OneWire.Control.OneWireController.OnStarting ( )
inlineprotectedvirtual

Called when starting, allows the subclass to perform startup tasks.

Reimplemented from Apac.Supervisable.

◆ OnStopping()

override void Apac.Dallas.OneWire.Control.OneWireController.OnStopping ( )
inlineprotectedvirtual

Called when stopping, allows the subclass to perform shutdown tasks.

Implements Apac.Control.ThreadedPollingController.

Property Documentation

◆ Features

override Apac.Licensing.LicensedFeatures Apac.Dallas.OneWire.Control.OneWireController.Features
get

Gets the features.

The features.

◆ NumReadings

override int Apac.Dallas.OneWire.Control.OneWireController.NumReadings
getprotected

Gets the num readings expected by the subclass.

The num readings.


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