Editing
SmartBox AlbertLink
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Remote "events" == The remote end also has "events" which it can originate, to start an event, transmit the "event" code and wait until you receive a 0 (byte), ignore all other bytes received (the remote end has priority) and then you can transmit any other bytes needed: === Setup === 1 +byte * byte = setup byte * as startup setup flag === List === 2 Return [string .....] until string is blank * this returns a list of procedures terminated by a blank === NameCode === 3 +string * '''NB''' doesn't return normal link 0 acknowledge. * Emulates the normal OS NameCode, quiting AlbertLink if the remote doesn't try to check for AlbertLink and going out of sleep if it does try for AlbertLink === Get === 4 +byte +string * byte = flag *: 0 : do not use labels *: 1 : use labels *: 255 : use LBLS setting ==== Old ==== Return byte: * 0 → no such procedure else procedure terminated by 0ffh ==== New ==== Return: * byte = 0 -> no such procedure * 1 +byte2 +byte3 +procedure → procedure found byte2/3 is number of lines in procedure === Put === 5 +string +[procedure strings terminated by 0ffh] Return: byte * 0 → ok * 1 → bad name * 2 → no room * 3 → bad data === Escape === 6 * causes escape condition === Quit === 7 * causes AlbertLink to quit === Cmd === 8 +string * performs a raw command, use only after flagged cmd ready else any running procedure will be stopped === GetPorts === 9 Return * byte = run mode (1 = running procedure) * byte = inputs * byte = outputs * byte = motors * byte = adc 1 * byte = adc 2 * byte = adc 3 * byte = adc 4 * byte = clock (hours) * byte = clock * byte = clock * byte = clock (cs) === GetPS === 10 Return * data as GetPorts * byte = sensor a id * byte = sensor b id * byte = sensor c id * byte = sensor d id Perform once a second or so to re-check the sensors === SteadyLine === 11 +byte +string * byte = flag *: 0 : do not use labels *: 1 : use labels *: 255 : use LBLS setting Return string * expanded line use in editor to expanded abbreviated commands === TraceFl === 12 +byte * byte = new trace setting and causes Trace "events" === SetPort === 13 +byte +byte2 * byte = bits to set * byte2 = bits to mask === Error === 14 +string * string = error to cause === Version === 15 Return string * version string === Sleep === 16 causes AlbertLink to sleep the remote link, waking up with a normal AlbertLink startup === CheckSensors === 17 Return * byte = sensor a id * byte = sensor b id * byte = sensor c id * byte = sensor d id === AskBack === 18 +string * string = input line === ReadLabels === 19 Return [+string1 (+string2) .......] * string1 = source label * string2 = label (not sent if string1 is blank) * string2 terminated by 0 for hard label and 128 for soft label * end of list terminated by string1 being blank === WriteLabel === 20 +string1 +string2 +byte * string1 = source label * string2 = label * byte = flag *: 0, hard label *: 1, soft label Return byte * byte = flag *: 0, okay *: 1, bad source label *: 2, bad label *: 3, label too long *: 4, label exists as a procedure *: 5, can't overwrite hard label with a soft label === FreeMem === 21 Return byte +byte2 * byte/2 = free memory === TraceCont === 22 This causes procedure execution to continue from a stopped trace === Clock === 23 +byte * byte = flag *: 0, stop clock *: 1, start clock *: 2, reset clock === PromptBack === 24 Send this when the user has clicked on the "prompt" === FileBack === 25 +byte * byte = flag *: 0, cannot open file *: 1, file opened Used in reply to File Print, Trace, SteadyLine, Get and Error surround any tokens with 1 to start token and 2 to finish token. Put and SteadyLine will remove them automatically before processing.
Summary:
Please note that all contributions to Smart Box may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Smart Box:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information