-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #368 from openxc/devicePlatformCommand
Added command to retrieve the device's platform
- Loading branch information
Showing
12 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#include "device_platform_command.h" | ||
#include "config.h" | ||
#include "diagnostics.h" | ||
#include "interface/usb.h" | ||
#include "util/log.h" | ||
#include "config.h" | ||
#include "pb_decode.h" | ||
#include <payload/payload.h> | ||
#include "signals.h" | ||
#include <can/canutil.h> | ||
#include <bitfield/bitfield.h> | ||
#include <limits.h> | ||
|
||
using openxc::util::log::debug; | ||
using openxc::config::getConfiguration; | ||
using openxc::payload::PayloadFormat; | ||
using openxc::signals::getCanBuses; | ||
using openxc::signals::getCanBusCount; | ||
using openxc::signals::getSignals; | ||
using openxc::signals::getSignalCount; | ||
using openxc::signals::getCommands; | ||
using openxc::signals::getCommandCount; | ||
using openxc::can::lookupBus; | ||
using openxc::can::lookupSignal; | ||
|
||
namespace can = openxc::can; | ||
namespace payload = openxc::payload; | ||
namespace config = openxc::config; | ||
namespace diagnostics = openxc::diagnostics; | ||
namespace usb = openxc::interface::usb; | ||
namespace uart = openxc::interface::uart; | ||
namespace pipeline = openxc::pipeline; | ||
|
||
bool openxc::commands::handleDevicePlatformCommmand() { | ||
char* platform_name; | ||
platform_name = strdup(config::getConfiguration()->platform); | ||
sendCommandResponse(openxc_ControlCommand_Type_PLATFORM, true, | ||
platform_name, strlen(platform_name)); | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#ifndef __DEVICE_PLATFORM_COMMAND_H__ | ||
#define __DEVICE_PLATFORM_COMMAND_H__ | ||
|
||
namespace openxc { | ||
namespace commands { | ||
|
||
bool handleDevicePlatformCommmand(); | ||
|
||
} // namespace commands | ||
} // namespace openxc | ||
|
||
#endif // __DEVICE_PLATFORM_COMMAND_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule openxc-message-format
updated
7 files
+6 −0 | CHANGELOG.md | |
+ − | gen/cpp/openxc.pb | |
+1 −1 | gen/cpp/openxc.pb.c | |
+3 −2 | gen/cpp/openxc.pb.h | |
+60 −56 | gen/java/com/openxc/BinaryMessages.java | |
+51 −47 | gen/python/openxc_pb2.py | |
+1 −0 | openxc.proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters