Example #1
0
        public PlatformService(Crazyflie crazyflie = null)
        {
            _cf = crazyflie;

            _has_protocol_version = false;
            _protocolVersion      = -1;
            _callback             = null;
        }
Example #2
0
        public _ReadRequest(MemoryElement mem, int addr, int length, Crazyflie cf)
        {
            this.mem         = mem;
            this.addr        = addr;
            this._bytes_left = length;
            this.data        = new byte[0];
            this.cf          = cf;

            this._current_addr = addr;
        }
Example #3
0
        public Param(Crazyflie crazyflie)
        {
            toc = new Toc();

            cf            = crazyflie;
            _useV2        = false;
            param_updater = new _ParamUpdater(cf, _useV2, null);

            is_updated = false;
        }
Example #4
0
 public _ParamUpdater(Crazyflie cf, bool useV2, Action <CRTPPacket> updated_callback)
 {
     this.cf               = cf;
     this._useV2           = useV2;
     this.updated_callback = updated_callback;
     this.request_queue    = new Queue <CRTPPacket>();
     this.cf.add_port_callback((byte)CRTPPort.PARAM, _new_packet_cb);
     this._should_close = false;
     this._req_param    = -1;
 }
Example #5
0
        public Memory(Crazyflie crazyflie = null)
        {
            mem_added_cb = new Caller();
            mem_read_cb  = new Caller();
            mem_write_cb = new Caller();

            cf = crazyflie;
            cf.add_port_callback((byte)CRTPPort.MEM, _new_packet_cb);
            cf.disconnected.add_callback(_disconnected);
            _clear_state();
        }
Example #6
0
        public _WriteRequest(MemoryElement mem, int addr, byte[] data, Crazyflie cf)
        {
            this.mem         = mem;
            this.addr        = addr;
            this._bytes_left = data.Length;
            this._data       = data;
            this.data        = new byte[0];
            this.cf          = cf;

            this._current_addr = addr;

            this._addr_add = 0;
        }
Example #7
0
 public TocFetcher(Crazyflie crazyflie, object element_class, byte port, Toc toc_holder, Action finished_callback, int toc_cache)
 {
     this.cf                = crazyflie;
     this.port              = port;
     this._crc              = 0;
     this.requested_index   = null;
     this.nbr_of_items      = null;
     this.state             = TOC_STATE.IDLE;
     this.toc               = toc_holder;
     this._toc_cache        = toc_cache;
     this.finished_callback = finished_callback;
     this.element_class     = element_class;
     this._useV2            = false;
 }
Example #8
0
 public _IncomingPacketHandler(Crazyflie cf)
 {
     this.cf = cf;
     this.cb = new List <_CallbackContainer>();
 }