SicsEase

Search SINQ Wiki:
SINQ LIN

SINQ Wiki
- Main Page
- Search SINQ Wiki
- Sample Environment
- Probenumg. Intern
- Troubleshooting SICS

This Page
- Page Info
- Printer Friendly

Referenced by
NewFeaturesInSICS

Wiki Info
- Unused pages
- Undefined pages
- RecentChanges
- Page Index
- System Info
- JSPWiki Docu
- SandBox
- OneMinuteWiki
- Create a New Page




JSPWiki v2.0.52


EASE - An Easy Way to Write Sample Environment Drivers

Motivation

Drivers for sample environment (SE) have some special demands which were not fully supported by the original SICS environment controller (EVC):

  • SE is changing, therefore the creation of objects is dynamic (i.e. after startup). This was already supported, but with the drawback, that they had to be created again when restarting SICS. All EASE objects are dynamic and persistent.
  • As SE hardware might be changed, it is not always guaranteed, that a device is connected and switched on. With the devices implemented in EVC, waiting for a response blocks the SICS server. EASE objects work with a simple "finite state machine" (fsm.c) which simulates a parallel execution of the tasks to be performed.
  • Making an EVC driver means writing a lot of code for initialization. For a more complex driver you need also much parameter and subcommand handling. EASE does initialization and parameter handling for you.

pardef

pardef.c contains the implementation base class ParData for a new type of SICS object. It contains parameter definition, parameter handling, parameter listing, logging and storing. The parameter definiton function is the heart of any object based on pardef. This function is called by the system for different actions which can be performed on an object.

EASE

ease.c contains two classes: EaseBase inherits ParData. It includes the finite state machine, and the handling of a serial connection to the hardware. EaseDriv inherits EaseBase. It makes the object driveable.

fsm

fsm.c is the implementation of a simple processor. The tasks which can be executed are functions (FsmFunc) which contain a switch statement, where every case is a step of the task to execute. When combined with EASE, the individual steps normally end with a command written to the device. After any step, the FsmFunc returns the line number of the next step. The system calles the FsmFunc again, when the response is ready. FsmFuncs might be nested.

Drivers based on EASE

For a driver, one needs to define

  • the parameter definition function
  • the start function, an FsmFunc, called after connection to the device
  • the read function, called repeatedly. It should read all relevant information from the device
  • a protocol dependent handler, dealing with the specialities of a protocol. This is normally implemented in a separate source file, as it might be used for different devices using the same protocol.
  • for driveable objects, a run function. It should contain all operations needed to drive to the target value
  • the initializer, calling EaseMakeBase or EaseMakeDriv with some class information and the functions mentioned above as arguments
  • the init function, creating the class and inserting the initializer to the system

For a list of predefined parameters and subcommands see EaseParametersAndCommands

For list of a available drivers based on EASE see EaseDrivers


Printer Friendly  Page Info
This page last changed on 19-Sep-2005 09:19:06 UTC by MarkusZolliker.