Sections in this page:
Introduction
In this document we shall provide a basic overview of how to develop C# .NET applications for ATDM on a Windows development machine. The following areas will be covered:
Configuring the development environment
Writing a demo console application
Deploying to ATDM
Debugging
Prerequisites
You will need to download and install the following applications:
Xamarin Studio for Windows. This is called MonoDevelop on Linux and to alleviate any incompatibility issues, please download the Windows version from:
We will need the Putty SSH tools for automating some remote tasks such as copying files and running the remote debugger
Installing and Configuring the Tools
Run the installer to install Xamarin. Once this is done you need to configure the environment to support remote debugging so you can debug applications running on your ATDM device. This is simply a matter of setting the variable MONODEVELOP_SDB_TEST to 1.
Right click on the Start Menu and select 'System'
Click on 'Advanced System Settings' and then 'Environment Variables'
Click 'New' and add MONODEVELOP_SDB_TEST and set value to 1
Now unzip the Putty package and copy it to your C:\Program Files folder. Next add Putty to the PATH environment variable:
Right click on the Start Menu and select 'System'
Click on 'Advanced System Settings' and then 'Environment Variables'
Click on 'Path' and press 'Edit...'
Click 'New' and add the path to your Putty installation e.g. 'C:\Program Files (x86)\Putty'
You will need to run putty manually to set up the ssh key for the connection to your ATDM device. Run 'cmd' from the Start menu and type:
putty.exe -ssh root@your_ip
then follow the instructions to save the keyATDM utilizes Crank's Storyboard IO API for bi-directional communication with the front-end UI and logic. The API provides transport delivery guarantees for messages placed into the queue regardless of the implementation. The maximum transport size of a message and the total queue capacity varies slightly from implementation to implementation; however, a 2K message size should be considered a design limit with the practical implementation limit around a 4K message payload size.
Image AddedStoryboard IO communicates events over a named uni-directional channel. By default, Storyboard applications have a receive channel named after the deployment bundle file (i.e., [bundlename].gapp). It allows backend applications to send events to the Storyboard Application. A custom receive channel can be specified in the command option for sbengine. The Storyboard application can transmit events on one or more channels. The backend software will need to open the channel and listen to events. See Storyboard IO API for more details.
Client applications can use Storyboard IO to create their communication channels and then receive events from that channel from the Storyboard application or any other Storyboard IO client.
CAN Generator
ATDM offers a CAN generator tool with SBIO support. It is configurable to use a specific DBC file and specific output directories for the generated source code. The generator tool will use the configured DBC file to output C and Lua source code to the configured directories. You can access the CAN generator's repo at the following Bitbucket link here.