HSC2011/Communication: Unterschied zwischen den Versionen
aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen
Chrysn (Diskussion | Beiträge) (serial format) |
Chrysn (Diskussion | Beiträge) K (fix category and fake subpages) |
||
Zeile 1: | Zeile 1: | ||
<small>< [[HSC2011]]</small> | |||
Most pieces of information (events, commands, etc.) travel through the whole [[HSC2011/Software|software stack]]. The steps there and interfaces are: | Most pieces of information (events, commands, etc.) travel through the whole [[HSC2011/Software|software stack]]. The steps there and interfaces are: | ||
Zeile 48: | Zeile 50: | ||
Read it in full length at [[HSC2011/Communication/Serial protocol]]. | Read it in full length at [[HSC2011/Communication/Serial protocol]]. | ||
[[Category:HSC2011]] | |||
[[Category:English]] |
Version vom 2. Mai 2011, 21:32 Uhr
< HSC2011
Most pieces of information (events, commands, etc.) travel through the whole software stack. The steps there and interfaces are:
File | Implementation | Interface | Description |
---|---|---|---|
firmware/ hardware.{cc,h} | Arduino calls | most low-level hardware functions, defining which pin maps to which function | |
boolean button(), void buzzer(uint16_t freq), … | |||
firmware/ firmware.cc | main loop | dispatch events | |
firmware/ firmware_net.{cc,h} (running on the buzzer) | net_proc(), net_send_until_acked() | send what is in send buffer, receive into send buffer | |
RF12 library calls | |||
firmware/ pktspec.h | struct formats for different package types | "wire" format of data | |
firmware/ firmware_net.{cc,h} (running on the base station) | RF library calls | ||
net_proc(), net_send() | |||
firmware/ firmware.cc | main loop | dispatch events | |
firmware/ firmware_net.{cc,h} | ser_printpkt(), ser_poll() | parse and serialize packages | |
Arduino serial library calls | |||
Serial USB connection | S 01 * * nnnn... | as described in serialprotocol | |
Ygor | Java server | Sends packages inserted via HTTP interface to serial, stores packages received via serial for polling | |
/poll?name=ls_events.sql | |||
software/ …/ base.js | JavaScript application | library for developing games | |
Edubuzzer.event_occurred, Edubuzzer.send_set()… | game development API | ||
your application | whatever you like |
Serial format
The serial serialization format is important as it is passed through the whole software stack (from C to JavaScript, although both also use processed forms of it). Even if it not directly used in the "wire" format strucs and the JavaScript object representation, it can be used to understand the other representations.
The serial format documentation also explains lots of details of how the devices can be controlled, so it is recommended reading for game developers env everyone else.
Read it in full length at HSC2011/Communication/Serial protocol.