User Tools

Site Tools


ch10_13_handbook:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ch10_13_handbook:start [2014/08/12 11:28] – [DOCUMENT PURPOSE] pferrillch10_13_handbook:start [2014/09/12 15:40] (current) – [SAMPLE CODE] mcferrill
Line 13: Line 13:
  
 [[RECORDER COMMAND AND CONTROL]] [[RECORDER COMMAND AND CONTROL]]
-  * Network Control +
-IRIG 106-09 added the ability to issue Chapter 6 commands via a TELNET interface. It does not specify how this interface is to be configured nor does it provide any specific commands for that purpose.+
  
 ==== SAMPLE CODE ==== ==== SAMPLE CODE ====
Line 20: Line 19:
  
 [[Python Code using DLL]] [[Python Code using DLL]]
--------- 
-==== CR031 - XML Mapping to Chapter 10 ==== 
  
-It was decided during an Recorder Vendor Working Group telecon to push CR031 into an appendix of the next release of the programmer's handbook. The work on this was submitted by Christian Rueck of Data Bus Tools GmbHThe XML below presents one example of a file definition based on this concept.+=== Samples Repository === 
 +The samples repository is hosted on bitbucket [[https://bitbucket.org/pychapter10/handbook-samples|here]]. 
 +Included in the repository are basic installation and usage directions akin to what is given here.
  
-<code XML> +The samples are organized into 3 categories: 
-<?xml version="1.0" encoding="UTF-8"?> +  * c Standard C samples using the Irig 106 library (from irig106.org) 
-<cns:ch10 xmlns:cns="http://www.example.org/XMLCH10Mapping"  +  * pyi106 Python samples using a wrapper to the above C library
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +  * pyc10 - Pure Python samples using the PyChapter10 library.
-  xsi:noNamespaceSchemaLocation="XMLCH10Mapping.xsd"  +
-  xsi:schemaLocation="http://www.example.org/XMLCH10Mapping XMLCH10Mapping.xsd">+
  
-<!-- Include some predefined TMATS file --> +Each of the above directories has the same basic samples written as similarly as possible to perform the following tasks: 
-    <cns:Packet ChannelID="0" RTC="0" DataType="TMATS"> +  * stat Read a .ch10/.c10 file and display information on the data it contains. Can also filter report based on data type and channel ID. 
-        <cns:TMATSData Ch10Version="106-13"> +  * copy Copy packets from one file to another. Can also filter based on data type and channel ID. 
-            <cns:IncludeFile>c:\someFile.tma</cns:IncludeFile> +  * dump Export packet contents to separate files (eg. export video data to .mpg files). Can also filter based on data type and channel ID. 
-        </cns:TMATSData> +  * video Full GUI application that will play split-screen video directly from a chapter 10 file as it is parsed in the background. 
-    </cns:Packet>+  * reindex (C sample still work in progress) - Strip index packets from a file and optionally rebuild new indices entirely
 +  * listen (work in progress) - Listens for chapter 10 over an ethernet stream and saves to file.
  
-<!-- Create a first time packets --> +**Dependencies (C samples)**
-    <cns:Packet ChannelID="1" RTC="0" DataType="Time Format 1"> +
-        <cns:TimeData> +
-            <cns:TimeDataContent Time="11:23:12.000" Date="2012-11-23"/> +
-        </cns:TimeData> +
-    </cns:Packet> +
-     +
-<!-- Define further time packets relative to first--> +
-    <cns:Packet ChannelID="1" RTC="c+10000000" DataType="Time Format 1"> +
-        <cns:TimeData> +
-            <cns:TimeDataRelativeContent Offset="1000000000"/> +
-        </cns:TimeData> +
-    </cns:Packet> +
-     +
-<!-- Further attributes could be defined but are optional--> +
-    <cns:Packet ChannelID="1" RTC="c+10000000" ChecksumType="CRC16"  +
-      DataType="Time Format 1" DataTypeVersion="106-13"> +
-        <cns:TimeData MonthYearAvailable="True" LeapYear="True" TimeFormat="IRIG B" TimeSource="External"> +
-            <cns:TimeDataRelativeContent Offset="1000000000"/> +
-        </cns:TimeData> +
-        </cns:Packet> +
-         +
-<!-- Errors can be introduced--> +
-    <cns:Packet ChannelID="1" RTC="c+10000000" DataType="Time Format 1" DataLength="+2"  +
-      PacketLength="27" HeaderCRC="+0001" DataOverflow="True" SequenceNumber="+5" DataCRC="1234"> +
-        <cns:GenericData> +
-            <cns:Bytes>0F 12 31 EF 6B</cns:Bytes> +
-        </cns:GenericData> +
-    </cns:Packet>+
  
-<!-- Packets can have secondary headers--> +  * Visual studio (developed on VS Ultimate 2013) 
-    <cns:Packet ChannelID="1" RTC="c+10000000" DataType="Time Format 1" SecondaryHeaderPresent="True"> +  * Qt 5 & Qt visual studio plugin (for video sample)
-        <cns:SecondaryHeader Time="11:23:12.000" Date="2012-11-23"/> +
-        <cns:TimeData> +
-            <cns:TimeDataRelativeContent Offset="1000000000"/> +
-        </cns:TimeData> +
-    </cns:Packet>+
  
-<!-- Secondary headers can have errors too--> +**Dependencies (Python Samples)**
-    <cns:Packet ChannelID="1" RTC="c+10000000" DataType="Time Format 1" SecondaryHeaderPresent="True"> +
-        <cns:SecondaryHeader ERTC="+0" CRC="-0001" Filler="3E 2F"/> +
-        <cns:TimeData> +
-            <cns:TimeDataRelativeContent Offset="1000000000"/> +
-        </cns:TimeData> +
-    </cns:Packet>+
  
-<!-- raw data like packet flags and CSDW can be defined as a base an modified by further options --> +  * Python 2.7 
-    <cns:Packet ChannelID="1" RTC="c+10000000" DataType="Time Format 1" PacketFlags="3F"  +  * PyChapter10 (see above, for pyc10 samples only) 
-      DataOverflow="True" SecondaryHeaderTimeFormat="Chapter 4 Binary"> +  * [[http://docopt.org|docopt]] 
-        <cns:TimeData CSDW="31e5893C" LeapYear="True" TimeSource="Internal From RMM"> +  * [[http://qt-project.org/wiki/PySide|PySide]] (for video samples)
-            <cns:TimeDataRelativeContent Offset="1000000000"/+
-        </cns:TimeData> +
-    </cns:Packet>+
  
-<!-- Arbitrary data can be added between packets--> +**Building and Running (C samples)**
-    <cns:Words>e37F 212B</cns:Words> +
-    <cns:Bytes>7F</cns:Bytes>+
  
-<!-- New packet types can be created--> +The code for the C samples are (as much as possible) kept in the src directory under C samples. The code has comments outlining the different sections and is written as consistently as possible to the matching samples in the pyc10 and pyi106 sample directories. The visual studio project files are in the vs directory at the top of the c directory structure. Make sure samples/c/src and samples/c/irig106lib/src are in your "Additional Include Directories" and you should be able to compile, debug, etc. 
-    <cns:Packet ChannelID="12RTC="333DataTypeRaw="8F"> + 
-        <cns:GenericData> +Once dependencies are installed you should be able to build binaries of the samples. The video sample depends on the mplayer executable (included) located relative to the build and debug directories, but the others are self-contained. 
-            <cns:Bytes>3F 77</cns:Bytes> + 
-        </cns:GenericData> +All of the samples (again, excluding video since it's a full GUI application) are run from the command line. Each one supports the --help option to view usage, options, etc. for that specific tool. 
-    </cns:Packet>+ 
 +**Building and Running (Python samples)** 
 + 
 +Once python and any other dependencies are installed the python samples can be run at the command prompt by prefixing the invocation with "pythonas in: "python stat.py test.c10which would run the stat sample on a file "test.c10". 
 + 
 +-------- 
 +===== APPENDIX ===== 
 + 
 +==== CR031 - XML Mapping to Chapter 10 ====
  
-<!-- Structured definition for specific packet types is available --> +It was decided during a Recorder Vendor Working Group telecon to push CR031 into an appendix of the next release of the programmer's handbook. The work on this was submitted by Christian Rueck of Data Bus Tools GmbH. The XML below presents one example of a file definition based on this concept.
-    <cns:Packet ChannelID="15" RTC="p+300" DataType="1553 Format 1"> +
-        <cns:MilbusData> +
-         +
-            <cns:MilbusMessage RTC="+20"> +
-                <cns:Words>453E 12FD</cns:Words> +
-            </cns:MilbusMessage> +
-             +
-            <cns:MilbusMessage RTC="+20" RTRTTransfer="True" ResponseTimeOut="True"> +
-                <cns:Words>453E 12FD</cns:Words> +
-            </cns:MilbusMessage> +
-             +
-<!-- Any data can be inserted in between --> +
-            <cns:Bytes>3F 21</cns:Bytes> +
-     +
-            <cns:MilbusMessage RTC="+20"> +
-                <cns:Words>453E 12FD</cns:Words> +
-            </cns:MilbusMessage> +
-             +
-        </cns:MilbusData> +
-    </cns:Packet> +
-    <cns:Bytes>3F</cns:Bytes> +
-     +
-</cns:ch10>+
  
-</code>+[[CR31 - XML Sample File]]
ch10_13_handbook/start.1407860917.txt.gz · Last modified: 2014/08/12 11:28 by pferrill

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki