Documentation
¶
Overview ¶
Package ibutton provides access to Maxim iButton devices
Index ¶
- Constants
- func Checksum(bytes []byte) uint16
- type Button
- func (b *Button) ClearMemory() error
- func (b *Button) Close()
- func (b *Button) CopyScratchpad() error
- func (b *Button) Open() (err error)
- func (b *Button) ReadLog() (samples []Sample, err error)
- func (b *Button) ReadScratchpad() (data []byte, err error)
- func (b *Button) StartMission() error
- func (b *Button) Status() (status *Status, err error)
- func (b *Button) StopMission() error
- func (b *Button) String() string
- func (b *Button) WriteScratchpad() error
- type Sample
- type Status
- func (s *Status) DeviceID() (model deviceID)
- func (s *Status) HighResolution() bool
- func (s *Status) MemoryCleared() bool
- func (s *Status) MissionInProgress() bool
- func (s *Status) MissionTimestamp() time.Time
- func (s *Status) Name() string
- func (s *Status) SampleCount() uint32
- func (s *Status) SampleRate() (duration time.Duration)
- func (s *Status) Time() time.Time
- type Temperature
Constants ¶
const ( DS2422 deviceID = 0x00 DS1923 = 0x20 DS1922L = 0x40 DS1922T = 0x60 DS1922E = 0x80 )
device identifier byte descriptors
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Button ¶
type Button struct {
// contains filtered or unexported fields
}
Button represents an iButton
func (*Button) ClearMemory ¶
ClearMemory clears the ibutton memory
func (*Button) CopyScratchpad ¶
CopyScratchpad copies the scratchpad
func (*Button) ReadScratchpad ¶
ReadScratchpad reads the button scrathpad
func (*Button) StopMission ¶
StopMission stops the currently running mission
func (*Button) WriteScratchpad ¶
WriteScratchpad writes the button scrathpad
type Sample ¶
type Sample struct { Time time.Time Temp Temperature }
Sample represents a mission log sample
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status represents an iButton status. The iButton's status is saved in two register pages (0x0200-0x0263)
func (*Status) DeviceID ¶
func (s *Status) DeviceID() (model deviceID)
DeviceID returns the device identifier
func (*Status) HighResolution ¶
HighResolution true if the chip is in 16bit (0.0625°C) mode
func (*Status) MemoryCleared ¶
MemoryCleared true when the memory has been successfully cleared (MEMCLR==1)
func (*Status) MissionInProgress ¶
MissionInProgress true if a mission is running
func (*Status) MissionTimestamp ¶
MissionTimestamp the current mission timestamp
func (*Status) SampleCount ¶
SampleCount count of recorded samples since last mission start
func (*Status) SampleRate ¶
SampleRate return the currently set sample rate
Directories
¶
Path | Synopsis |
---|---|
Package main provides a client for Maxim iButton devices
|
Package main provides a client for Maxim iButton devices |
ibutton-gui
|
|