def __init__(self, sim_env, message_id, data, timestamp, sender_id):
        ''' Constructor
            
            Input:    sim_env        simpy.Environment        environment of this component
                      message_id     integer                  message identifier
                      data           object                   content of the message
                      timestamp      float                    time the message was generated
                      sender_id      string                   id of the sender
        '''
        AbstractSegmentBusMessage.__init__(self, sim_env, message_id, data,
                                           timestamp, sender_id)
        self.message_identifier = message_id  # 29 Bits
        self.ide = 1  # 1 Bit
        self.r0 = 0  # 1 Bit
        self.dlc = 4  # 4 Bits
        self.data = data  # 0 ... 64 Bits
        self.crc = 1  # 15 Bits
        self.crc_delimiter = 0  # 1 Bit
        self.ack_slot = 0  # 1 Bit IN can FD its 2 Bit
        self.ack_delimiter = 0  # 1 Bit
        self.eof = 0  # 7 Bits

        self._msg_length_in_bit = 60
        self.no_stuffing_bits = 0
        self.timestamp = timestamp
Exemple #2
0
    def __init__(self, sim_env, message_id, data, timestamp, sender_id):
        ''' Constructor
            
            Input:    sim_env        simpy.Environment        environment of this component
                      message_id     integer                  message identifier
                      data           object                   content of the message
                      timestamp      float                    time the message was generated
                      sender_id      string                   id of the sender
        '''
        AbstractSegmentBusMessage.__init__(self, sim_env, message_id, data,
                                           timestamp, sender_id)

        self.sof = 1  # Start of Frame
        self.message_identifier = message_id  # 11 Bits
        self.srr = 1  # 1 Bit
        self.ide = 1  # 1 Bit
        self.identifier_extension = 18  # 18 Bits
        self.r1 = 1  # 1 Bit
        self.edl = 1  # 1 Bits
        self.r0 = 1  # 1 Bit
        self.brs = 1  # 1 Bit
        self.esi = 1  # 1 Bit

        self.dlc = 4  # 4 Bits

        self.data = data  # 0 ... 64 Bytes

        self.crc = 1  # 15 Bits
        self.crc_delimiter = 0  # 1 Bit
        self.ack_slot = 2  # 1 Bit
        self.ack_delimiter = 0  # 1 Bit
        self.eof = 0  # 7 Bits

        self._msg_length_in_bit = 65  # no extension = 47, with extension = 65
        self.no_stuffing_bits = 0
        self.timestamp = timestamp

        # CAUTION: The length of the data field of the message is still
        #          8 Bytes! The only difference is that there are 64 Bytes
        #          in that 8 Bytes

        self.unique_id = uuid.uuid4()
    def __init__(self, sim_env, message_id, data, timestamp, sender_id):
        ''' Constructor
            
            Input:    sim_env        simpy.Environment        environment of this component
                      message_id     integer                  message identifier
                      data           object                   content of the message
                      timestamp      float                    time the message was generated
                      sender_id      string                   id of the sender
        '''
        AbstractSegmentBusMessage.__init__(self, sim_env, message_id, data, timestamp, sender_id)
        
        self.sof = 1  # Start of Frame
        self.message_identifier = message_id  # 11 Bits
        self.srr = 1  # 1 Bit
        self.ide = 1  # 1 Bit
        self.identifier_extension = 18  # 18 Bits
        self.r1 = 1  # 1 Bit 
        self.edl = 1  # 1 Bits
        self.r0 = 1  # 1 Bit 
        self.brs = 1  # 1 Bit 
        self.esi = 1  # 1 Bit 
        
        self.dlc = 4  # 4 Bits    
                    
        self.data = data  # 0 ... 64 Bytes
        
        self.crc = 1  # 15 Bits
        self.crc_delimiter = 0  # 1 Bit
        self.ack_slot = 2  # 1 Bit
        self.ack_delimiter = 0  # 1 Bit
        self.eof = 0  # 7 Bits
        
        self._msg_length_in_bit = 65  # no extension = 47, with extension = 65
        self.no_stuffing_bits = 0
        self.timestamp = timestamp

        # CAUTION: The length of the data field of the message is still 
        #          8 Bytes! The only difference is that there are 64 Bytes
        #          in that 8 Bytes
        
        self.unique_id = uuid.uuid4()
 def __init__(self, sim_env, message_id, data, timestamp, sender_id):
     ''' Constructor
         
         Input:    sim_env        simpy.Environment        environment of this component
                   message_id     integer                  message identifier
                   data           object                   content of the message
                   timestamp      float                    time the message was generated
                   sender_id      string                   id of the sender
     '''
     AbstractSegmentBusMessage.__init__(self, sim_env, message_id, data, timestamp, sender_id)
     self.message_identifier = message_id  # 29 Bits
     self.ide = 1  # 1 Bit
     self.r0 = 0  # 1 Bit 
     self.dlc = 4  # 4 Bits
     self.data = data  # 0 ... 64 Bits
     self.crc = 1  # 15 Bits
     self.crc_delimiter = 0  # 1 Bit
     self.ack_slot = 0  # 1 Bit IN can FD its 2 Bit
     self.ack_delimiter = 0  # 1 Bit
     self.eof = 0  # 7 Bits
     
     self._msg_length_in_bit = 60
     self.no_stuffing_bits = 0
     self.timestamp = timestamp