![]() The output is a dataframe with the same index as the input dataframe, containing decoded results for the frames matched by the loaded DBC file. Instead, the index of the DataFrame passed to the decoder will be used as the index in the resulting DataFrame. Unlike the iterator component, this method does not require the presence of a time stamp entry. The data supplied should be similar to that of the iterator method, but as a DataFrame. This is constructed with the conversion rules as a parameter and can be re-used several times from the same set of parameters:ĭf_decoder = can_decoder.DataFrameDecoder(db)ĭf_phys_1 = df_code_frame(df_raw_1)ĭf_phys_2 = df_code_frame(df_raw_2) SignalValuePhysical - physical value of the decoded signalįor batch conversion of messages, the library uses the DataFrameDecoder class.SignalValueRaw - raw value of the decoded signal.TimeStamp - timestamp of the record as regular Python datetime.The output is of the form decoded_signal, which is a namedtuple with the following fields: In the case multiple signals are defined from a single ID, the library iterator will queue them internally, deferring the request for more data until all signals have been consumed from the iterator. TimeStamp - A floating point number, representing seconds passed since epoch.DataBytes - A bytearray, in the order the data bytes appear on the CAN bus.IDE - boolean specifying if the record uses a regular 11 bit ID or an extended 29 bit ID. ![]() ID - integer specifying the 11 or 29 bit CAN ID. ![]() This method expects an iterator structure like that of mdf_iter - incl. Decoder = can_decoder.IteratorDecoder(mdf_file, db) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |