Class: ZSS::Message::SMI

Inherits:
Object
  • Object
show all
Defined in:
lib/zss/message/smi.rb

Constant Summary collapse

SMI =
'SMI'

Class Method Summary collapse

Class Method Details

.down(sid) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/zss/message/smi.rb', line 9

def self.down sid
  Message.new(
    address: Message::Address.new(
      sid: SMI,
      verb: 'DOWN'
    ),
    payload: sid
  )
end

.heartbeat(sid) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/zss/message/smi.rb', line 29

def self.heartbeat sid
  Message.new(
    address: Message::Address.new(
      sid: SMI,
      verb: 'HEARTBEAT'
    ),
    payload: sid
  )
end

.up(sid) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/zss/message/smi.rb', line 19

def self.up sid
  Message.new(
    address: Message::Address.new(
      sid: SMI,
      verb: 'UP'
    ),
    payload: sid
  )
end