Changeset 12 for trunk/Arduino/libraries


Ignore:
Timestamp:
Jul 4, 2019, 12:39:57 AM (7 years ago)
Author:
markus
Message:

Update: OT_Data conversion

Location:
trunk/Arduino/libraries/OT_Slave
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Arduino/libraries/OT_Slave/OT_Slave.cpp

    r11 r12  
    55
    66// OpenthermData  OT_Slave::message;
     7
     8uint32_t        OT_Action::OTD2uint32 (const OpenthermData& data)
     9{
     10        uint32_t val(data.type);
     11        val = ((val << 8) | data.id);
     12        val = ((val << 8) | data.valueHB);
     13        val = ((val << 8) | data.valueLB);
     14        return val;
     15}
    716
    817OT_Action OT_Slave::action;
  • trunk/Arduino/libraries/OT_Slave/OT_Slave.h

    r11 r12  
    99  OpenthermData request;
    1010  OpenthermData response;
     11
     12  uint32_t      GetRequestValue () const { return OTD2uint32(request); }
     13  uint32_t      GetResponseValue () const { return OTD2uint32(response); }
     14
     15  static uint32_t       OTD2uint32 (const OpenthermData&);
    1116};
    1217
Note: See TracChangeset for help on using the changeset viewer.