@@ -51,6 +51,7 @@ class CanMsg(Structure):
5151 DWORD ,
5252 ), # Receive time stamp in ms (for transmit messages no meaning)
5353 ]
54+ __hash__ = Structure .__hash__
5455
5556 def __init__ (
5657 self , id_ = 0 , frame_format = MsgFrameFormat .MSG_FF_STD , data = None , dlc = None
@@ -116,6 +117,7 @@ class Status(Structure):
116117 ("m_wCanStatus" , WORD ), # CAN error status (see enum :class:`CanStatus`)
117118 ("m_wUsbStatus" , WORD ), # USB error status (see enum :class:`UsbStatus`)
118119 ]
120+ __hash__ = Structure .__hash__
119121
120122 def __eq__ (self , other ):
121123 if not isinstance (other , Status ):
@@ -171,6 +173,7 @@ class InitCanParam(Structure):
171173 WORD ,
172174 ), # number of transmit buffer entries (default is 4096)
173175 ]
176+ __hash__ = Structure .__hash__
174177
175178 def __init__ (
176179 self , mode , BTR , OCR , AMR , ACR , baudrate , rx_buffer_entries , tx_buffer_entries
@@ -277,6 +280,7 @@ class HardwareInfoEx(Structure):
277280 ("m_dwUniqueId3" , DWORD ),
278281 ("m_dwFlags" , DWORD ), # additional flags
279282 ]
283+ __hash__ = Structure .__hash__
280284
281285 def __init__ (self ):
282286 super ().__init__ (sizeof (HardwareInfoEx ))
@@ -389,6 +393,7 @@ class ChannelInfo(Structure):
389393 WORD ,
390394 ), # CAN status (same as received by method :meth:`UcanServer.get_status`)
391395 ]
396+ __hash__ = Structure .__hash__
392397
393398 def __init__ (self ):
394399 super ().__init__ (sizeof (ChannelInfo ))
0 commit comments