Diff: 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


Difference between version 2 and version 1:
Line 1 was replaced by lines 1-64
- !!EASE - An Easy way to Write Sample Environment Drivers]
+ !!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 simple driver, which is only a monitor (like a level meter),
+ 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
+ * for driveable objects, a run function. It should contain all
+ operation 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

Back to SicsEase, or to the Page History.