Пример #1
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
        '''
        AbstractBusMessage.__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  # 21 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 = 71
        self.no_stuffing_bits = 0
        self.timestamp = timestamp
Пример #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
     '''
     AbstractBusMessage.__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  # 21 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 = 71
     self.no_stuffing_bits = 0
     self.timestamp = timestamp
Пример #3
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
        '''
        AbstractBusMessage.__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
 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
     '''
     AbstractBusMessage.__init__(self, sim_env, message_id, data, timestamp, sender_id)
     
     self.expected_size = 0  # at max 4095 Byte!
     self.seg_type = 0  # 4 bit
     self.seg_index = 0  # 
                                     # data field indicating size not bigger than 4095
     # First frame has 12 bits for size indicator
     #             has 6 byte for data
     self._msg_length_in_bit = 0
Пример #5
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
        '''
        AbstractBusMessage.__init__(self, sim_env, message_id, data, timestamp,
                                    sender_id)

        self.expected_size = 0  # at max 4095 Byte!
        self.seg_type = 0  # 4 bit
        self.seg_index = 0  #
        # data field indicating size not bigger than 4095
        # First frame has 12 bits for size indicator
        #             has 6 byte for data
        self._msg_length_in_bit = 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
     '''
     AbstractBusMessage.__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