Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

IsoAgLib::iSystem_c Class Reference

Layer class to encapsulate the hardware specific details. Central layer object to encapsulate hardware specific details which uses other object to implement specific I/O operations. More...

#include <isystem_c.h>

Inheritance diagram for IsoAgLib::iSystem_c:

Inheritance graph
[legend]
Collaboration diagram for IsoAgLib::iSystem_c:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ~iSystem_c ()
 destructor which shuts down the hardware (f.e.
bool init (bool rb_forceReinit=false, SystemPowerdownStrategy_t rt_strategy=DEFAULT_POWERDOWN_STRATEGY)
 Initialize the system hardware.
void setPowerdownStrategy (SystemPowerdownStrategy_t rt_strategy)
 default behaviour of IsoAgLib is to activate power hold, so that the application can decide on its own, if a CAN_EN loss shall cause a power down of the target.

Static Public Member Functions

void close (void)
 every subsystem of IsoAgLib has explicit function for controlled shutdown the call of System_c::close() stimulates final shutdown of power
bool initWd (void)
 init the hardware watchdog (uses BIOS function)
void triggerWd (void)
 trigger the watchdog
int32_t getTime ()
 deliver lasted time from start of system in msec.
bool canEn ()
 deliver the CanEn setting -> if system goes down
int16_t getBatteryVoltage (void)
 get the main power voltage
int16_t getExternalSensorPowerVoltage (void)
 get the voltage of the external reference 8.5Volt for work of external sensors
void serialNo (uint8_t *const snrDat)
 deliver the serial nr of the device into uint8_t[6] array - f.e.

Private Member Functions

 iSystem_c (void)
 private constructor which prevents direct instantiation in user application NEVER define instance of iSystem_c within application

Friends

iSystem_cgetIsystemInstance (void)
 allow getIsystemInstance() access to shielded base class.

Detailed Description

Layer class to encapsulate the hardware specific details. Central layer object to encapsulate hardware specific details which uses other object to implement specific I/O operations.

All system interaction must be done via this class (and member classes). To avoid runtime overhead, most functions are declared inline.

Author:
Dipl.-Inform. Achim Spangler

Definition at line 68 of file isystem_c.h.


Constructor & Destructor Documentation

IsoAgLib::iSystem_c::~iSystem_c  )  [inline]
 

destructor which shuts down the hardware (f.e.

power off)

Definition at line 71 of file isystem_c.h.

IsoAgLib::iSystem_c::iSystem_c void   )  [inline, private]
 

private constructor which prevents direct instantiation in user application NEVER define instance of iSystem_c within application

Definition at line 147 of file isystem_c.h.


Member Function Documentation

bool IsoAgLib::iSystem_c::canEn void   )  [inline, static]
 

deliver the CanEn setting -> if system goes down

Returns:
true -> D+ or. CAN_EN is active OR D+ should not be checked

Reimplemented from __IsoAgLib::System_c.

Definition at line 118 of file isystem_c.h.

void IsoAgLib::iSystem_c::close void   )  [inline, static]
 

every subsystem of IsoAgLib has explicit function for controlled shutdown the call of System_c::close() stimulates final shutdown of power

Reimplemented from __IsoAgLib::System_c.

Definition at line 95 of file isystem_c.h.

int16_t IsoAgLib::iSystem_c::getBatteryVoltage void   )  [inline, static]
 

get the main power voltage

Returns:
voltage of power [mV]

Reimplemented from __IsoAgLib::System_c.

Definition at line 123 of file isystem_c.h.

References int16_t.

int16_t IsoAgLib::iSystem_c::getExternalSensorPowerVoltage void   )  [inline, static]
 

get the voltage of the external reference 8.5Volt for work of external sensors

Returns:
voltage at external reference [mV]

Reimplemented from __IsoAgLib::System_c.

Definition at line 128 of file isystem_c.h.

References int16_t.

int32_t IsoAgLib::iSystem_c::getTime  )  [inline, static]
 

deliver lasted time from start of system in msec.

Returns:
running time in [msec.]

Reimplemented from __IsoAgLib::System_c.

Examples:
1_0_ReadIso.cc, 1_1_ReadDin.cc, 2_0_LocalReadDataStdIso.cc, 2_1_LocalReadDataSimpleMeasureIso.cc, 2_2_LocalReadDataSimpleSetpointIso.cc, 2_3_LocalReadDataSimpleMeasureSetpointIso.cc, and 2_8_RemoteReadDataSimpleMeasureIso.cc.

Definition at line 112 of file isystem_c.h.

References HAL::getTime(), and int32_t.

Referenced by localIsWorking(), and main().

Here is the call graph for this function:

bool IsoAgLib::iSystem_c::init bool  rb_forceReinit = false,
SystemPowerdownStrategy_t  rt_strategy = DEFAULT_POWERDOWN_STRATEGY
[inline]
 

Initialize the system hardware.

(uses BIOS function)

possible errors: Err_c::SystemOpen problem during start of system with BIOS call Err_c::SystemWatchdog the System_c::init_wd call caused an error Err_c::unspecified Bios calls for TaskTimer, Relais or StayAlive caused an error

Returns:
true -> everything without errors initialised

Definition at line 82 of file isystem_c.h.

bool IsoAgLib::iSystem_c::initWd void   )  [inline, static]
 

init the hardware watchdog (uses BIOS function)

possible errors: Err_c::SystemWatchdog BIOS watchdog configuration without success

Returns:
true -> watchdog successful configured

Reimplemented from __IsoAgLib::System_c.

Definition at line 105 of file isystem_c.h.

void IsoAgLib::iSystem_c::serialNo uint8_t *const   snrDat  )  [inline, static]
 

deliver the serial nr of the device into uint8_t[6] array - f.e.

to calculated individual wait berfore address claim

Parameters:
snrDat pointer to 6 uint8_t array, where the serial no of the device is stored

Reimplemented from __IsoAgLib::System_c.

Definition at line 136 of file isystem_c.h.

References uint8_t.

void IsoAgLib::iSystem_c::setPowerdownStrategy SystemPowerdownStrategy_t  rt_strategy  )  [inline]
 

default behaviour of IsoAgLib is to activate power hold, so that the application can decide on its own, if a CAN_EN loss shall cause a power down of the target.

This allows to inhibit stop of application on short power supply voltage low bursts.

Parameters:
rt_strategy PowerdownByExplcitCall -> stop system only on explicit call of System_c::close() PowerdownOnCanEnLoss -> let BIOS/OS automatically switch off on CAN_EN loss

Definition at line 91 of file isystem_c.h.

void IsoAgLib::iSystem_c::triggerWd void   )  [inline, static]
 

trigger the watchdog

Reimplemented from __IsoAgLib::System_c.

Definition at line 107 of file isystem_c.h.


Friends And Related Function Documentation

iSystem_c& getIsystemInstance void   )  [friend]
 

allow getIsystemInstance() access to shielded base class.

otherwise __IsoAgLib::getSystemInstance() wouldn't be accepted by compiler

Definition at line 151 of file isystem_c.h.


The documentation for this class was generated from the following file:
Generated on Wed Oct 13 15:46:38 2004 for IsoAgLib by  doxygen 1.3.8-20040913