Skip to content

Commit

Permalink
getter
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Nov 2, 2024
1 parent 00f2fe3 commit 6f9a26f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion opendbc/can/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class CANParser {
const std::vector<std::pair<uint32_t, int>> &messages);
CANParser(int abus, const std::string& dbc_name, bool ignore_checksum, bool ignore_counter);
std::set<uint32_t> update(const std::vector<CanData> &can_data);
MessageState *messageState(uint32_t address) { return &message_states.at(address); }
MessageState *getMessageState(uint32_t address) { return &message_states.at(address); }

protected:
void UpdateCans(const CanData &can, std::set<uint32_t> &updated_addresses);
Expand Down
2 changes: 1 addition & 1 deletion opendbc/can/common.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ cdef extern from "common.h":
bool bus_timeout
CANParser(int, string, vector[pair[uint32_t, int]]) except +
set[uint32_t] update(vector[CanData]&) except +
MessageState *messageState(uint32_t address)
MessageState *getMessageState(uint32_t address)

cdef cppclass CANPacker:
CANPacker(string)
Expand Down
2 changes: 1 addition & 1 deletion opendbc/can/parser_pyx.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ cdef class CANParser:
vl_all = self.vl_all[addr]
ts_nanos = self.ts_nanos[addr]

state = self.can.messageState(addr)
state = self.can.getMessageState(addr)
for i in range(state.parse_sigs.size()):
name = <unicode>state.parse_sigs[i].name
vl[name] = state.vals[i]
Expand Down

0 comments on commit 6f9a26f

Please sign in to comment.