Files
giesCANne/help/customsender.html
T
2021-05-21 21:08:00 -04:00

282 lines
22 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>74. Custom Sender Window &#8212; SavvyCAN 189 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="79. Scripting Interface" href="scriptingwindow.html" />
<link rel="prev" title="70. Playback Window" href="playbackwindow.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="custom-sender-window">
<h1><span class="section-number">74. </span>Custom Sender Window<a class="headerlink" href="#custom-sender-window" title="Permalink to this headline"></a></h1>
<p>.</p>
<img alt="_images/CustomSender.png" src="_images/CustomSender.png" />
</div>
<div class="section" id="general-overview">
<h1><span class="section-number">75. </span>General Overview<a class="headerlink" href="#general-overview" title="Permalink to this headline"></a></h1>
<p>This window allows you to create custom frames that will be sent out on one of the can buses. The uses are endless.
It can be used to generate valid traffic to control connected hardware. It can be used to test out various ideas
you might have for now to interact with other devices. It can replay frames from one bus into the other bus but with
modifications.</p>
</div>
<div class="section" id="layout-of-the-view">
<h1><span class="section-number">76. </span>Layout of the View<a class="headerlink" href="#layout-of-the-view" title="Permalink to this headline"></a></h1>
<p>This screen is laid out as a data grid.</p>
<ul class="simple">
<li><p>The first field is “En” which stands for Enabled. If the checkbox is checked
then this line will be active.</p></li>
<li><p>The second field is “Bus” and sets which bus to use for sending.</p></li>
<li><p>The third field is “ID” and is the ID to use for sending. It can be specified in hex or decimal formats.</p></li>
<li><p>The fourth field is “Len” and sets the number of data bytes for this frame.</p></li>
<li><p>The fifth field is “Data” and specifies what values will be sent for the next frame. These values can be
automatically updated by the modifiers which will be covered later on.</p></li>
<li><p>The sixth field is “Trigger” which specifies when this frame will be sent. Proper syntax for triggers is
covered later.</p></li>
<li><p>The seventh field is “Modifications” which specifies how the data bytes for this frame will be changed for
the next frame sent. Full syntax for this is covered later on.</p></li>
<li><p>The final field is “Count” and is automatically filled out with the number of frames that have been sent as
a result of this line.</p></li>
</ul>
</div>
<div class="section" id="writing-trigger-rules">
<h1><span class="section-number">77. </span>Writing Trigger Rules<a class="headerlink" href="#writing-trigger-rules" title="Permalink to this headline"></a></h1>
<p>It should first be noted that each line can contain multiple triggers. Each trigger is separated by a comma ‘,’.</p>
<p>Triggers are allowed to have one or more conditions. Each condition contained within a single trigger is separated
by a space ‘ ‘.</p>
<p>The program implements the following conditions:</p>
<ul class="simple">
<li><p>id - Set the trigger to activate when a frame with the given ID is received. The syntax is ‘id’
followed by the numeric ID you want to match. Example: ‘id0x200’</p></li>
<li><p>ms - Set the number of milliseconds to wait. This condition acts differently depending on whether
you have set ID matching as well. If so then ms will cause a delay of the requested number of milliseconds
after receiving a frame with the ID. If not, the trigger will constantly fire every time the requested number
of milliseconds have elapsed. The syntax is the number of desired milliseconds followed by ‘ms’. For example:
‘40ms’.</p></li>
<li><p>x - Only allow this trigger to fire a set number of times. The syntax is the number of times you want the trigger
to fire followed by ‘x’. For example: ‘100x’.</p></li>
<li><p>bus - Only trigger when a frame with the given ID comes in on the specified bus. Otherwise the triggering frame
could come from either bus. The syntax is ‘bus’ followed by either ‘0’ or ‘1’. For example: ‘bus0’</p></li>
</ul>
<p>Now, a full example of a trigger line: “id0x200 5ms 10x bus0,1000ms” This trigger means: Trigger when a frame with ID 0x200 comes
in on bus 0. Wait 5 milliseconds before sending and only allow this to happen at most 10 times. Also, always trigger every
1 second and never stop doing this.</p>
</div>
<div class="section" id="writing-modifications">
<h1><span class="section-number">78. </span>Writing Modifications<a class="headerlink" href="#writing-modifications" title="Permalink to this headline"></a></h1>
<p>As with the triggers, you can have multiple modifications per line; each of which is separated by a comma ‘,’.</p>
<p>Modifications always start with a data byte to modify The syntax is ‘D’ or ‘d’ followed by a number 0 through 7.
For example: ‘D4’. This is then always followed by an equal sign ‘=’. Thereafter there is a string of operands and
operations.</p>
<p>Operands have a special syntax. Each operand can have multiple sections separated by colons ‘:’.</p>
<ul class="simple">
<li><p>D - A data byte. Specifies which data byte 0 - 7 from the given frame to use for this operation. If specified
on its own it will reference the data in the “Data” section of this line. The syntax is ‘d’ or ‘D’ followed
by a number 0 - 7. Example: ‘D3’.</p></li>
<li><p>ID - Instead of grabbing data from this line’s data bytes grab it from the last frame received with the given ID.
Syntax: ‘ID’ followed by a colon ‘:’ followed by the ID to match against. Example: ‘ID:0x200’</p></li>
<li><p>BUS - Restrict which bus the frame used for grabbing the data bytes can come in on. Syntax: ‘BUS’ followed by
a colon ‘:’ followed by 0 or 1 to specify which bus to use. Example: ‘BUS:0’</p></li>
<li><p>&lt;NUMBER&gt; - Instead of using a data byte from somewhere you can instead use a numeric literal. The syntax is
the same as any number - either a series of numbers or 0x followed by a series of numbers and A - F to specify
a hexadecimal number. Example: 0x10.</p></li>
</ul>
<p>A few full examples of operands:</p>
<ul class="simple">
<li><p>“bus:0:id:0x120:D3” = Grab byte 3 from the last frame with ID 0x120 that came in on bus 0.</p></li>
<li><p>“0x200” = Use the numeric value 0x200 directly.</p></li>
<li><p>“id:0x200:D7” = Grab byte 7 from the last frame received with ID 0x200.</p></li>
</ul>
<p>Each operand is usually followed by an operation and then a second operand. If no operation or second operand is found that
is also OK. Thus a modifier can be as simple as “D0 = D1” if you choose. Operands can also be directly chained such that the
output of the last operation is used as the left hand operand for the next operation. This will be shown later on.</p>
<p>Modifiers can use the following operations:</p>
<ul class="simple">
<li><p>+ - Add the two operands together. Example: “D1 + D2”</p></li>
<li><p>- - Subtract the second operand from the first operand. Example: “D1 - D2”</p></li>
<li><p>* - Multiply the two operands together. Example: “D1 * D2”</p></li>
<li><p>/ - Divide the first operand by the second operand. Example: “D1 / D2”</p></li>
<li><p>&amp; - Do the bitfield operation AND on the two operands. Example: D1 &amp; 0x20</p></li>
<li><p>| - Do the bitfield operation OR on the two operands. Example: D1 | 0x10</p></li>
<li><p>^ - Do the bitfield operation XOR on the two operands. Example: D1 ^ 0xD2</p></li>
</ul>
<p>Putting all of that together yields complete modifiers. For simplicity all operations
are done left to right. There is no special order of operations like in normal mathematics.</p>
<p>Here are a few examples:</p>
<ul class="simple">
<li><p>“D0=D0+1” = Take the value in D0 within this line’s data bytes, add 1, and store it back in D0.</p></li>
<li><p>“D1=ID:0x200:D3+ID:0x200:D4&amp;0xF0” = Grab byte 3 from the most recently received frame with ID 0x200 and add it
to byte 4 from the same received frame. AND this new value with 0xF0 and finally store it in D1 of the data bytes for this line.</p></li>
<li><p>“D2=D4 * 10 + D3 &amp; 0x3F” = Multiply byte 4 by 10, add the new value to byte 3, AND the resulting value by 0x3F and store it in byte 2.</p></li>
</ul>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">SavvyCAN</a></h1>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="mainscreen.html">1. Main / Start Up Screen</a></li>
<li class="toctree-l1"><a class="reference internal" href="mainscreen.html#the-main-frame-list">2. The Main Frame List</a></li>
<li class="toctree-l1"><a class="reference internal" href="mainscreen.html#the-bottom-statusbar">3. The Bottom Statusbar</a></li>
<li class="toctree-l1"><a class="reference internal" href="mainscreen.html#the-rest-of-the-main-window">4. The Rest of the Main Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="mainscreen.html#loading-and-saving-frames">5. Loading And Saving Frames</a></li>
<li class="toctree-l1"><a class="reference internal" href="mainscreen.html#filters">6. Filters</a></li>
<li class="toctree-l1"><a class="reference internal" href="mainscreen.html#what-is-dbc-and-why-would-i-care">7. What is DBC and why would I care?!</a></li>
<li class="toctree-l1"><a class="reference internal" href="mainscreen.html#how-dbc-interacts-with-the-main-screen">8. How DBC interacts with the main screen?</a></li>
<li class="toctree-l1"><a class="reference internal" href="connectionwindow.html">9. Connection Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="connectionwindow.html#connecting-to-a-dongle">10. Connecting To A Dongle</a></li>
<li class="toctree-l1"><a class="reference internal" href="connectionwindow.html#debugging-connection-problems">11. Debugging Connection Problems</a></li>
<li class="toctree-l1"><a class="reference internal" href="preferences.html">12. Preference Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="preferences.html#setting-preferences">13. Setting Preferences</a></li>
<li class="toctree-l1"><a class="reference internal" href="dbc_manager.html">14. DBC File Manager</a></li>
<li class="toctree-l1"><a class="reference internal" href="dbc_manager.html#working-with-dbc-files">15. Working with DBC Files</a></li>
<li class="toctree-l1"><a class="reference internal" href="dbc_manager.html#dbc-file-ordering">16. DBC File Ordering</a></li>
<li class="toctree-l1"><a class="reference internal" href="dbc_editor.html">17. DBC Message Editor</a></li>
<li class="toctree-l1"><a class="reference internal" href="dbc_editor.html#working-with-nodes">18. Working with Nodes</a></li>
<li class="toctree-l1"><a class="reference internal" href="dbc_editor.html#working-with-messages">19. Working with Messages</a></li>
<li class="toctree-l1"><a class="reference internal" href="signaleditor.html">20. DBC Signal Editor</a></li>
<li class="toctree-l1"><a class="reference internal" href="signaleditor.html#defining-and-editing-signals">21. Defining and Editing Signals</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html">22. Graphing Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html#creating-a-new-graph">23. Creating a new Graph</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html#selecting-a-graph">24. Selecting a Graph</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html#editing-a-graph">25. Editing a Graph</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html#deleting-graphs">26. Deleting Graphs</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html#moving-around">27. Moving Around</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html#loading-and-saving-graphs">28. Loading and Saving Graphs</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html#real-time-graphing">29. Real Time Graphing</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphwindow.html#hidden-tricks">30. Hidden Tricks</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphsetup.html">31. Graph Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphsetup.html#setting-up-a-graph">32. Setting up a Graph</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphsetup.html#graphing-a-dbc-signal">33. Graphing a DBC Signal</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphsetup.html#manual-signal-graphing-or-editing">34. Manual Signal Graphing (Or Editing)</a></li>
<li class="toctree-l1"><a class="reference internal" href="flowview.html">35. Flow View Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="flowview.html#the-purpose-of-flow-view">36. The Purpose of Flow View</a></li>
<li class="toctree-l1"><a class="reference internal" href="flowview.html#selecting-an-id-to-flow">37. Selecting an ID to Flow</a></li>
<li class="toctree-l1"><a class="reference internal" href="flowview.html#viewing-the-flow">38. Viewing the Flow</a></li>
<li class="toctree-l1"><a class="reference internal" href="flowview.html#controlling-the-flow">39. Controlling the Flow</a></li>
<li class="toctree-l1"><a class="reference internal" href="flowview.html#additional-control-options">40. Additional control options</a></li>
<li class="toctree-l1"><a class="reference internal" href="flowview.html#reference-values">41. Reference Values</a></li>
<li class="toctree-l1"><a class="reference internal" href="flowview.html#seeking-to-specific-values">42. Seeking to Specific Values</a></li>
<li class="toctree-l1"><a class="reference internal" href="bisector.html">43. Bisector Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="bisector.html#using-the-bisector-window">44. Using the Bisector Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="sniffer.html">45. Sniffer Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="sniffer.html#using-the-sniffer-window">46. Using the Sniffer Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="sniffer.html#notching-and-unnotching">47. Notching and Unnotching</a></li>
<li class="toctree-l1"><a class="reference internal" href="sniffer.html#advanced-options">48. Advanced Options</a></li>
<li class="toctree-l1"><a class="reference internal" href="sniffer.html#never-expire-ids">49. Never Expire IDs</a></li>
<li class="toctree-l1"><a class="reference internal" href="sniffer.html#mute-notched-bits">50. Mute notched bits</a></li>
<li class="toctree-l1"><a class="reference internal" href="sniffer.html#fade-inactive-bytes">51. Fade inactive bytes</a></li>
<li class="toctree-l1"><a class="reference internal" href="sniffer.html#view-bits">52. View Bits</a></li>
<li class="toctree-l1"><a class="reference internal" href="framedetails.html">53. Frame Details Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="framedetails.html#the-purpose-of-frame-details-window">54. The Purpose of Frame Details Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="filecomparison.html">55. File Comparison Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="filecomparison.html#the-purpose-of-the-file-comparator">56. The Purpose of the File Comparator</a></li>
<li class="toctree-l1"><a class="reference internal" href="filecomparison.html#the-layout-of-the-differences-list">57. The layout of the differences list</a></li>
<li class="toctree-l1"><a class="reference internal" href="fuzzingwindow.html">58. Fuzzing Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="fuzzingwindow.html#the-purpose-of-fuzzing">59. The Purpose of Fuzzing</a></li>
<li class="toctree-l1"><a class="reference internal" href="fuzzingwindow.html#fuzzing-is-dangerous">60. Fuzzing is Dangerous</a></li>
<li class="toctree-l1"><a class="reference internal" href="fuzzingwindow.html#controlling-the-fuzzy-beast">61. Controlling the Fuzzy Beast</a></li>
<li class="toctree-l1"><a class="reference internal" href="fuzzingwindow.html#pulling-the-trigger">62. Pulling the Trigger</a></li>
<li class="toctree-l1"><a class="reference internal" href="isotp_decoder.html">63. ISO-TP Decoder</a></li>
<li class="toctree-l1"><a class="reference internal" href="isotp_decoder.html#using-the-iso-tp-decoder">64. Using the ISO-TP Decoder</a></li>
<li class="toctree-l1"><a class="reference internal" href="rangestate.html">65. Range State Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="rangestate.html#using-the-range-state-window">66. Using the Range State Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="uds_scanner.html">67. UDS Scan Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="uds_scanner.html#purpose-of-the-uds-scan-window">68. Purpose of the UDS Scan Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="uds_scanner.html#using-the-uds-scan-window">69. Using the UDS Scan Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="playbackwindow.html">70. Playback Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="playbackwindow.html#preparing-frames-for-playback">71. Preparing Frames for Playback</a></li>
<li class="toctree-l1"><a class="reference internal" href="playbackwindow.html#playing-back-frames">72. Playing Back Frames</a></li>
<li class="toctree-l1"><a class="reference internal" href="playbackwindow.html#playback-status">73. Playback Status</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">74. Custom Sender Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="#general-overview">75. General Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="#layout-of-the-view">76. Layout of the View</a></li>
<li class="toctree-l1"><a class="reference internal" href="#writing-trigger-rules">77. Writing Trigger Rules</a></li>
<li class="toctree-l1"><a class="reference internal" href="#writing-modifications">78. Writing Modifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html">79. Scripting Interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#purpose-of-the-scripting-interface">80. Purpose of the Scripting Interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#managing-scripts">81. Managing Scripts</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#getting-script-status">82. Getting Script Status</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#writing-scripts">83. Writing Scripts</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#callback-functions">84. Callback Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#the-host-object">85. The host Object</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#the-can-object">86. The can Object</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#the-isotp-object">87. The isotp Object</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#the-uds-object">88. The uds Object</a></li>
<li class="toctree-l1"><a class="reference internal" href="scriptingwindow.html#a-full-example-script">89. A full example script</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="playbackwindow.html" title="previous chapter"><span class="section-number">70. </span>Playback Window</a></li>
<li>Next: <a href="scriptingwindow.html" title="next chapter"><span class="section-number">79. </span>Scripting Interface</a></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2018, EVTV.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.5.4</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.8</a>
|
<a href="_sources/customsender.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>