-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
159 lines (159 loc) · 6.58 KB
/
index.html
File metadata and controls
159 lines (159 loc) · 6.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE>OpenLCB Python Prototype</TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 3.3 (Unix)">
<META NAME="CREATED" CONTENT="0;0">
<META NAME="CHANGEDBY" CONTENT="Bob Jacobsen">
<META NAME="CHANGED" CONTENT="20120526;17001600">
<STYLE TYPE="text/css">
<!--
H3.cjk { font-family: "SimSun" }
H3.ctl { font-family: "Lucida Sans" }
-->
</STYLE>
</HEAD>
<BODY LANG="en-US" BGCOLOR="#e6e6ff" DIR="LTR">
<H1><FONT COLOR="#000000"><IMG SRC="../../web/logo-ajs-dph.png" NAME="OpenLCB" ALIGN=RIGHT WIDTH=337 HEIGHT=135 BORDER=2></FONT>OpenLCB
Python Prototype</H1>
<P>This is the index page of the OpenLCB™ Python prototypes
directory.</P>
<P>Most of the Python modules in this package are meant to be run
from the command line, or invoked programmatically.
</P>
<P>To run one from the Mac OS X or Linux command line, first edit the
<A HREF="defaults.py">defaults.py</A> file with your connection
information, then do e.g.:
</P>
<PRE STYLE="margin-bottom: 0.5cm"><CODE>./verifyNodeGlobal.py -v</CODE></PRE><P>
To run the full set of tests from the Mac OS X or Linux command line,
do :
</P>
<PRE STYLE="margin-bottom: 0.5cm"><CODE>./allTest.py -t -v && echo OK</CODE></PRE><P>
followed by testing the start-up sequencing with :
</P>
<PRE STYLE="margin-bottom: 0.5cm"><CODE>./testStartup.py -t -v && echo OK</CODE></PRE><P>
(Reset the node when prompted to force the start-up sequence to run)</P>
<P>When running from the command line, internal help is available via
the -h option, as in:</P>
<PRE STYLE="margin-bottom: 0.5cm"><CODE>./verifyNodeGlobal.py -h</CODE></PRE><P STYLE="margin-bottom: 0cm">
Common options are:</P>
<UL>
<LI><P STYLE="margin-bottom: 0cm">-h Print help information</P>
<LI><P STYLE="margin-bottom: 0cm">-v Verbose, show summary
information (normal operation is to complete silently)</P>
<LI><P STYLE="margin-bottom: 0cm">-V Very verbose, show each message</P>
<LI><P STYLE="margin-bottom: 0cm">-a nnn Source alias to be included
in transmitted messages</P>
<LI><P STYLE="margin-bottom: 0cm">-d nnn Destination alias to be
included in transmitted messages</P>
<LI><P STYLE="margin-bottom: 0cm">-t Dynamically find the
destination alias for the node-under-test (assumes only one node
present)</P>
</UL>
<P STYLE="margin-bottom: 0cm">There are text files containing typical
output from running
</P>
<PRE STYLE="margin-bottom: 0.5cm"><CODE><A HREF="allTest.log">./allTest.py -t -V</A></CODE></PRE><P>
and
</P>
<PRE STYLE="margin-bottom: 0.5cm"><CODE><A HREF="testStartup.log">./testStartup.py -t -V</A></CODE></PRE><P>
test scripts that you can consult to see what normal operation looks
like. Note that they contain node IDs, aliases, and event IDs that
are specific to the particular node being tested, so your mileage
</P>
<UL>
<P>will</P>
</UL>
<P>vary.
</P>
<P STYLE="margin-bottom: 0cm">The type of access (Ethernet or USB)
and parameters such as IP address, default node IDs, etc are defined
in the default.py file. When using the command line, edit that file
for your specific needs. If you're using a serial connection, you
need to have PySerial installed, which is
<a href="http://pyserial.sourceforge.net/pyserial.html#installation">described here</a>.</P>
<H3 CLASS="western">Utilities and Modules</H3>
<P>The basic Ethernet connection is accessed via the
"ethernetolcblink" module.
</P>
<PRE STYLE="margin-bottom: 0.5cm"><CODE> import ethernetolcblink</CODE></PRE><P>
The basic USB-Serial connection is accessed via the "serialolcblink"
module.
</P>
<PRE STYLE="margin-bottom: 0.5cm"><CODE> import serialolcblink</CODE></PRE><P>
Other cross-connection utilities can found in the "canolcbutils"
module.
</P>
<H3 CLASS="western">Frame and Message Tools</H3>
<DL>
<DT><B>verifyNodeGlobal</B></DT><DD STYLE="margin-bottom: 0.5cm">
Send a "Verify Node Global" message, getting a reply from
each connected node.
</DD><DT>
<B>verifyNodeAddressed</B></DT><DD STYLE="margin-bottom: 0.5cm">
Send a "Verify Node Addressed" message, getting a reply
from the addressed node.
</DD><DT>
<B>identifyConsumers</B></DT><DD STYLE="margin-bottom: 0.5cm">
Send an "Identify Consumers" message, which will generate
a reply from any node using consuming the Event ID
</DD><DT>
<B>identifyProducers</B></DT><DD STYLE="margin-bottom: 0.5cm">
Send a "Identify Producers" message, which will generate a
reply from any node using consuming the Event ID.
</DD><DT>
<B>identifyEventsGlobal</B></DT><DD STYLE="margin-bottom: 0.5cm">
Send a "Identify Events Global" message, getting a reply
from each connected node.
</DD><DT>
<B>identifyEventsAddressed</B></DT><DD STYLE="margin-bottom: 0.5cm">
Send a "Verify Node Global" message.
</DD><DT>
<B>datagram</B></DT><DD STYLE="margin-bottom: 0.5cm">
Send a "datagram" message.
</DD></DL>
<H3 CLASS="western">
Tests</H3>
<DL>
<DT><B>allTest</B></DT><DD STYLE="margin-bottom: 0.5cm">
Runs the complete set of tests in sequence
</DD><DT>
<B>testProducerConsumerNotification</B></DT><DD STYLE="margin-bottom: 0.5cm">
Uses IdentifyEvents to learn which events a node produces and
consumes, then checks that IdentifyConsumers and IdentifyProducers
will find them.
</DD><DT>
<B>testConfigurationProtocol</B></DT><DD STYLE="margin-bottom: 0.5cm">
Does a sequence of tests of the configuration protocol
</DD><DT>
<B>testConfigurationProtocol</B></DT><DD STYLE="margin-bottom: 0.5cm">
Does a sequence of tests of the configuration protocol
</DD></DL>
<H3 CLASS="western">
Tools</H3>
<DL>
<DT><B>monitor</B></DT><DD>
Monitors received frames until cancelled
</DD><DT>
<B>readConfiguration</B></DT><DD>
Reads from a node via the configuration protocol
</DD><DT>
<B>ethernetolcblink</B></DT><DD>
Allows you to send specific CAN frames via an Ethernet adapter
</DD><DT>
<B>getUnderTestAlias</B></DT><DD STYLE="margin-bottom: 0.5cm">
Assumes there is only one node attached, and finds the alias for
addressing it.
</DD></DL>
<P>
<BR><BR>
</P>
<HR>
<P STYLE="margin-bottom: 0cm">This web site contains trademarks and
copyrighted information. Please see the <A HREF="/Licensing.html">Licensing</A>
page.</P>
<P STYLE="margin-bottom: 0cm">This is SVN $Revision$ of <SDFIELD TYPE=DATETIME SDVAL="40041.4309143519" SDNUM="1033;1033;MM/DD/YY">08/16/09</SDFIELD>.</P>
</BODY>
</HTML>