290 likes | 439 Views
Overview of my student placement. Philipp Spliethoff. 31 October 2014. Agenda. SOIS Proof of Concept – File Store Service Basic Overview Specific implementations Documentation XtratuM Context Analyser. Spacecraft Onboard Interface Services (SOIS). SOIS – Overview.
E N D
Overview of my student placement • Philipp Spliethoff 31 October 2014
Agenda • SOIS Proof of Concept – File Store Service • Basic Overview • Specific implementations • Documentation • XtratuM • Context Analyser Placement Overview
Spacecraft Onboard Interface Services (SOIS) Placement Overview
SOIS – Overview • Standardised Interfaces of spacecraft equipment by specifying well-defined service • Abstracting subnetworks of the spacecraft • Three service layers: • Application Support Layer services • Provide common capabilities needed onboard • Use subnetwork layer services (locally or remotely) • Transfer Layer services • Subnetwork Layer services • Associated with one underlying data link • Mapped to best possible extend (using convergence functions) • Defined by the Consultative Committee for Space Data System (CCSDS) Placement Overview
Spacecraft Onboard Interface Services Placement Overview
SOIS – Benefit • Reusability of user-applications • Independent development of s/w and h/w (stable subnetworks) • Core services • Porting subsystems and payload across missions • reduced development time and cost Placement Overview
Spacecraft Onboard Interface Services Proof of ConceptFile Store Service Placement Overview
SOIS File Store Service • The SOIS File Store Services provide a standard interface to allow onboard software to request: • access to files resident in a file store • modifications to files in a file store • management of files within a file store (e.g., create, delete, rename) • Split into File Access Service and File Management Service Placement Overview
SOIS FSS – File Access Service Primitives • Open a file • Close a file • Read from a file • Write to a file • Optional: • Seek to an Offset of a file • Easy to implement One-to-one wrapping on POSIX system calls (open, close, lseek etc.) Placement Overview
SOIS FSS – File Management Service Primitives • list the contents of a directory • copy and move files • create and delete files. • Optional features: • create, rename and delete directories • get and change the user entity’s current directory • rename files • lock or unlock files • list the currently locked files • find a file within a file store • get the status of a file Placement Overview
SOIS File Store Service Example Deployment of the SOIS File Store Service using multiple Distributed Mass Memories Placement Overview
SOIS FSS – My Implementation • RTEMS Library • Highly Configurable (at build time) through pre-processor directives • Implements all features defined by the SOIS (minimal and optional) • AVL Tree added to global utility repository • non-deterministic state machine to evaluate wildcard expressions • Documented using Doxygen Placement Overview
Based on: RTEMS 4.8 RTEMS In Memory File System (IMFS) Direct Function Calls Can easily be advanced to use network protocol SOIS FSS – Implementation IMFS Placement Overview
SOIS FSS – Function Implementation • Direct wrapper functions to all POSIX compatible FS • Open, Close, Read, Write, Seek, CreateFile, DeleteFile, CreateDir, DeleteDir • Implementation through combination of existing POSIX function • ListDirectory, CopyFile, MoveFile, MoveDir • Additional mechanism needed • GetWorkingDirectory, RenameDir, FindFile, FileLocks(Lock/UnlockFile, ListLockedFiles…) • MoveDir is not defined by SOIS FSS, implements RenameDir through use of POSIX calls (rename() is broken in RTEMS 4.8) Placement Overview
SOIS FSS – Locking • Lock unopened files • Locks restrict access to the file • Lock types: • lock-owner read-only access, all other user entities no access • lock-owner read-only access, all other user entities read-only access • lock-owner read-write access, all other user entities no access • No native locking from file system • No way to check if a file is opened • Possible Solutions: • POSIX chmod() to change access rights according to the lock • Create lock files on the file system • Use a internal structure to store information about locks Placement Overview
SOIS FSS – Locking Design Placement Overview
Self balancing binary search tree Search in log(n) time Fast lookup Balancing done when item is inserted/deleted (log(n) time) Operations: Insert Delete Find Inorder Walk (e.g. print content sorted D D A A A A B B E E B B B B Insert Sequence: A, B, C, D, E, F C C C C A A C C F F D D D D E E E E E E E E Binary Tree AVL Tree Util – AVL Tree Placement Overview
SOIS FSS - FindFile • SOIS recommends using wildcards to match file names • non-deterministic finite state machine to evaluate wild card characters to represent the expression • Comparison between a filename and the machine in linear time • Possible characters: *, +, ?, {, } Placement Overview
State machine • State machine for “a*c?d+e” Placement Overview
Documentation Doxygen Placement Overview
Doxygen • Generate documentation from comments in source files • Languages: C++, C, Java, Objective-C, Python, IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D • Output as HTML, Latex, rtf, PS, PDF, Man-Pages • Highly configurable • Open Source and licensed under GNU GPL • Documentation is not affected by GPL • Internal Preprocessor • Easy switch between different Documentation version (e.g. customer and internal version) Placement Overview
Doxygen – HTML Output Sample Placement Overview
XtratuM Placement Overview
XtratuM - Overview • Hypervisor for embedded systems enabling partitioning • Free and Open Source (GPLv2) • Applications on top don’t derive that • Developed for leon2 • Able to run RTOS like RTEMS or Linux • Target: • Get it working on leon3 • Test features Placement Overview
XtratuM - Conclusion • Easy to set up • Hardware and partitions are defined in a XML file • Documentation is available • created Detailed xml file description <CyclicPlanTable> <Plan id="0" majorFrame="10s"> <Slot id="0" start="0ms" duration= "5s" partitionId="0"/> <Slot id="1" start="5s" duration= "1s" partitionId="1"/> <Slot id="2" start="6s" duration= "500ms" partitionId="2"/> <Slot id="3" start="6500ms" duration= "100ms" partitionId="3"/> <Slot id="4" start="6700ms" duration= "50ms" partitionId="4"/> <Slot id="5" start="6800ms" duration= "10ms" partitionId="5"/> <Slot id="6" start="6900ms" duration= "5ms" partitionId="6"/> <Slot id="7" start="6950ms" duration= "1ms" partitionId="7"/> <Slot id="8" start="7000ms" duration= "2s" partitionId="8"/> </Plan> </CyclicPlanTable> Placement Overview
XtratuM - Conclusion • Features: • IPC restricted by Partition hierarchy and definition • XAL – Basic C support • RTEMS – is available, but I didn’t test it • Altenatives: • LithOS • PaRTiKle (GPLv2) Placement Overview
Context Analyser Placement Overview
Context Analyser • Get real timing information about RTEMS tasks running on hardware • Approach: • Output Task ID to IO pins of the RASTA/FPGA-Board • Inserted code into the RTEMS source code to output the ID Placement Overview
Context Analyser • Result: • Works with Oscilloscope • Logic Analyser is ordered Placement Overview