Difference between revisions of "MansOS Command line interface"

From DiLab
Jump to: navigation, search
(New page: == Command line interface source == Zem mansos/apps/Command/pc ir testa skripts test.sh, ko var palaist, lai redzētu, ko var izdarīt un kā to visu lietot. Esmu to visu testējis ar di...)
 
(Future work)
 
Line 33: Line 33:


* Interoperability with SNMP.
* Interoperability with SNMP.
* whole MOS resource tree could be included as a subtree in SNMP hierarchy
** whole MOS resource tree could be included as a subtree in SNMP hierarchy


* (?) Alow packet fragmentation. i.e. allow to respond with multiple response packets to a single request.
* (?) Alow packet fragmentation. i.e. allow to respond with multiple response packets to a single request.

Latest revision as of 22:54, 2 November 2008

Command line interface source

Zem mansos/apps/Command/pc ir testa skripts test.sh, ko var palaist, lai redzētu, ko var izdarīt un kā to visu lietot.

Esmu to visu testējis ar divām motēm, radio strādā bez problēmām.

Pagaidām tiek atbaltīti divi resursi: LEDi :) un IEEE adrese jeb motes seriālais numurs.

Ja gribas likt klāt jaunu resursu, tad vajag:

  • 1) pievienot jaunu case statementu funkcijā processCommand()
  • 2) uzrakstīt atbilstošo handlošanas funkciju, pēc analoģijas ar processLedCommand()
  • 3) ja gribas, lai outputā rādītos simbolisks vārds, nevis skaitlisks OIDs, tad vajag resursa OIDu pievienot masīvam knownOids (failā pc/main.c).


At the moment:

  • nav adresācijas, tāpēc viss tiek nosūtīts visām motēm tiklā!
  • maksimālais SMP paketes garums ir 128 baiti! (būs vairāk, bet neesmu uztaisījis)
  • netiek atbalstīta patvaļīga garuma datu iekļaušana SMP paketēs.

(varētu būt vajadzīgs, piemēram rakstīšanai atmiņā vai flašā).

Vajadzētu arī to visu labāk integrēt ar device manager - vajadzētu lietot vienus un to pašus kodus SMP OIDiem un devicēm (tagad ir attiecīgi SMP_RES_xxx un DEV_xxx)


Future work

  • Improve user interface. Make command input/output easier - use symbolic resource names.
Should keep them in a text file, with format similar to SNMP MIB (write MIB parser!).
  • Interoperability with SNMP.
    • whole MOS resource tree could be included as a subtree in SNMP hierarchy
  • (?) Alow packet fragmentation. i.e. allow to respond with multiple response packets to a single request.
  • Implement META OIDs.
  SMP_META_TIMESTAMP - unique timestamp/sequence number for packet identification
  SMP_META_REPEAT_INTERVAL - how often to repeat responses
  SMP_META_REPEAT_TIMES - how many times to repeat