OneWire Library for Arduino  version: 1.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
RomCommands.h
Go to the documentation of this file.
1 /******************************************************************/
34 #ifndef OneWire_RomCommands
35 #define OneWire_RomCommands
36 
37 #include <stdint.h>
38 #include "RomId/RomId.h"
39 #include "Masters/OneWireMaster.h"
40 
41 namespace OneWire
42 {
44  namespace RomCommands
45  {
47  struct SearchState
48  {
53 
55  void reset();
56 
59  void findFamily(uint8_t familyCode);
60 
63  void skipCurrentFamily();
64 
65  SearchState() { reset(); }
66  };
67 
69  OneWireMaster::CmdResult OWFirst(OneWireMaster & master, SearchState & searchState);
70 
72  OneWireMaster::CmdResult OWNext(OneWireMaster & master, SearchState & searchState);
73 
75  OneWireMaster::CmdResult OWVerify(OneWireMaster & master, const RomId & romId);
76 
82 
87 
92  OneWireMaster::CmdResult OWMatchRom(OneWireMaster & master, const RomId & romId);
93 
100 
104 
109 
114  OneWireMaster::CmdResult OWSearch(OneWireMaster & master, SearchState & searchState);
115  }
116 }
117 
118 #endif
Standard container for a 1-Wire ROM ID.
Definition: RomId.h:43
OneWireMaster::CmdResult OWOverdriveMatchRom(OneWireMaster &master, const RomId &romId)
Definition: RomCommands.cpp:206
OneWireMaster::CmdResult OWReadRom(OneWireMaster &master, RomId &romId)
Definition: RomCommands.cpp:119
bool last_device_flag
Definition: RomCommands.h:52
OneWireMaster::CmdResult OWOverdriveSkipRom(OneWireMaster &master)
Definition: RomCommands.cpp:184
RomId romId
Definition: RomCommands.h:49
void findFamily(uint8_t familyCode)
Definition: RomCommands.cpp:60
OneWireMaster::CmdResult OWSearch(OneWireMaster &master, SearchState &searchState)
Definition: RomCommands.cpp:240
OneWireMaster::CmdResult OWResume(OneWireMaster &master)
Definition: RomCommands.cpp:227
OneWireMaster::CmdResult OWFirst(OneWireMaster &master, SearchState &searchState)
Find the 'first' devices on the 1-Wire bus.
Definition: RomCommands.cpp:82
uint8_t last_discrepancy
Definition: RomCommands.h:50
void reset()
Reset to the search state to start at the beginning.
Definition: RomCommands.cpp:52
uint8_t last_family_discrepancy
Definition: RomCommands.h:51
OneWireMaster::CmdResult OWVerify(OneWireMaster &master, const RomId &romId)
Verify that the device with the specified ROM ID is present.
Definition: RomCommands.cpp:95
OneWireMaster::CmdResult OWNext(OneWireMaster &master, SearchState &searchState)
Find the 'next' devices on the 1-Wire bus.
Definition: RomCommands.cpp:89
Definition: DS2484.h:41
OneWireMaster::CmdResult OWMatchRom(OneWireMaster &master, const RomId &romId)
Definition: RomCommands.cpp:165
Base class for all 1-Wire Masters.
Definition: OneWireMaster.h:43
State used by all ROM ID search functions.
Definition: RomCommands.h:47
void skipCurrentFamily()
Definition: RomCommands.cpp:67
CmdResult
Result of all 1-Wire commands.
Definition: OneWireMaster.h:68
OneWireMaster::CmdResult OWSkipRom(OneWireMaster &master)
Definition: RomCommands.cpp:152
SearchState()
Definition: RomCommands.h:65