Wiki

Clone wiki

alagna / todo

Alagna CDH requirements/desirements/designifications

  • Assume rtos with preemptive rate based threads, Qs
  • Keep CSCs separated into classes
    • If you need another CSCs tlm, ask TC for it. NO globals allowed (if possible)
      • If you need to cmd another CSC, use CM to cmd it.
    • One day this will run on a uP with an MMU and memory protected OS. (Ha! Right. But I can dream. ;)
    • Apps will be heavy weight tasks. pass data with Qs. no direct access
    • Right now TC will have pkt* but that should change when there is more SRAM (eg: SAMD).
  • "application" super class has pure virtual functions process() and processCmd()
    • has pointers to CM, TM, and does thread mgmt
      • thread reads cmd Q, does processing, calls pure virtual processCmd(pkt*)
    • sub-class has function processCmd(pkt*) that should switch on pktid
      • must return ack with execution status. super replies to CM
    • If the super class handles the threading, Qs, and provides utility functions for the registration of cmds/tlm, then all architecture setup is abstracted from the sub-class. The sub-class would have no idea if there was an rtos or just a main exec in the Loop() function. Then a less capable platform, like Uno could go without an rtos to save SRAM and a SAMD could be higher performing, with better real-time properties, etc.
    • process() is for rate based execution and is called from super-class from a thread if applicable or from Loop() with rate/timeout checking. This isn't as RT, but good enough.
    • Loop in the rtos case would be empty.
    • If cmd IO is interrupt driven then CM would have to have a more direct connection with each CSC super class.
  • hwif
    • core utilizes serial IO
    • provide IO funcs for CM and TM. size = read(buf*), write(buf*, size)
    • mission can override if desired (xBee, Bluetooth, etc.)
    • soh pkt with metrics
      • bps on each i/f (c&t)
  • cmdMgr
    • registerCmd(id#, Q*)
      • Super class "application" would define whether Q*/pkt*/func* is passed to CM::registerCmd().
    • multiple CSCs can register for same cmd id
    • can send from CSCs internally
    • interrupt driven
    • must support noop cmd
    • must support clr ctrs cmd (how to clear all ctrs across core CSCs)
    • soh pkt with metrics
      • cmd acks
  • tlmMgr
    • registerTlm(id#, pkt*, rate)
    • rate based execution (100hz)
      • check time, then send tlm if timed out
    • rate change cmd
    • other CSCs can request tlm pkt
    • CSCs can push pkts
      • TC already has pkt*, a push would just be an indication and TC would do normal work.
    • only 1 id can be registered
    • soh pkt with metrics
      • pkts sent per id
      • buffer full status?
  • time
    • must support pps cmd
    • functions to get and set time available to CSCs (sec/usec)
    • must support clock gain cmd
  • Event Messaging
    • provides static method to push event pkts out the tlm i/f
    • filter on cmd
      • 256 filter levels or
      • 16 CSC/apids filtered to 16 levels
  • main
    • csc registration
    • kick off threads
  • future functionality
    • time
      • gps
    • tlm
      • only send if checksum has changed since last send
      • mode based subscriptions with rates for each pkt
      • priority based tlm
    • All I/O
      • chksum all pkts
    • cmd
      • mode based cmd filtering
      • cmd sequences
  • future CSCs
    • limits monitor
    • fault protection/responses
    • Memory Manager
      • handles file system
        • initialization
        • read config files and sends cmds through CM to all apps
          • config files contain mode definitions, mode transition table, mode based cmd filtering table, tlm mode subscriptions, fault responses, limits setpoints, Event filtering config, etc.

Updated