Exemple #1
0
        public void getResponse(ref XBeeResponse response)
        {
            response.setMsbLength(_response.getMsbLength());
            response.setLsbLength(_response.getLsbLength());
            response.setApiId(_response.getApiId());
            response.setFrameLength(_response.getFrameDataLength());

            // Eliminar punteros de la siguiente funcion *********************************
            //response.setFrameData(_response.getFrameData());
        }
Exemple #2
0
        private SerialPort _serial; //manejador del puerto serie que conecta al modulo Xbee

        #endregion Fields

        #region Constructors

        public XBee()
        {
            _pos = 0;
            _escape = false;
            _checksumTotal = 0;
            _nextFrameId = 0;

            _response = new XBeeResponse();
            _response.init();
            _response.setFrameData(_responseFrameData);
            // default
            //_serial = &Serial;
        }
Exemple #3
0
 /**
 * Call with instance of ZBTxStatusResponse class only if getApiId() == ZB_TX_STATUS_RESPONSE
 * to populate response
 */
 public void getZBTxStatusResponse(ref XBeeResponse response)
 {
     response.setFrameData(getFrameData());
     setCommon(ref response);
 }
Exemple #4
0
 private void setCommon(ref XBeeResponse target)
 {
     target.setApiId(getApiId());
     target.setAvailable(isAvailable());
     target.setChecksum(getChecksum());
     target.setErrorCode(getErrorCode());
     target.setFrameLength(getFrameDataLength());
     target.setMsbLength(getMsbLength());
     target.setLsbLength(getLsbLength());
 }
Exemple #5
0
        /**
        * Call with instance of ModemStatusResponse only if getApiId() == MODEM_STATUS_RESPONSE
        */
        public void getModemStatusResponse(ref XBeeResponse modemStatusResponse)
        {
            //ModemStatusResponse* modem = static_cast<ModemStatusResponse*>(&modemStatusResponse);

            // pass pointer array to subclass
            modemStatusResponse.setFrameData(getFrameData());
            setCommon(ref modemStatusResponse);
        }