Motion Master 6.0.0-alpha.86
Next-generation motion control software
Loading...
Searching...
No Matches
profile_device.h File Reference
#include <chrono>
#include <cstdint>
#include <expected>
#include <optional>
#include <stop_token>
#include <string>
#include <string_view>
#include <vector>
#include "node/device.h"
Include dependency graph for profile_device.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mm::node::Identity
 The CANopen identity object (0x1018) — the four UNSIGNED32 sub-entries that uniquely identify a device on the bus. More...
 
struct  mm::node::RestoreDefaultParameters
 The restore-default-parameters object (0x1011) — one UNSIGNED32 per restorable group. Reading a sub-entry reports the restore capability (bit 0 = device restores on command); writing the "load" signature to it triggers the restore. More...
 
struct  mm::node::StoreParametersConfig
 Timing for the store-parameters confirmation walk (ProfileDevice::runStoreParameters). More...
 
struct  mm::node::RestoreDefaultParametersConfig
 Retry/timing for the restore-default-parameters confirmation walk (ProfileDevice::runRestoreDefaultParameters). More...
 
class  mm::node::ProfileDevice
 Root of the drive-profile view hierarchy — a concrete, instantiable, borrowed view over a Device that exposes the generic CANopen device area (CiA301). More...
 

Namespaces

namespace  mm
 
namespace  mm::node
 

Enumerations

enum  mm::node::GenericObject : uint16_t {
  mm::node::kDeviceType = 0x1000 , mm::node::kErrorRegister = 0x1001 , mm::node::kCobIdSync = 0x1005 , mm::node::kCommunicationCyclePeriod = 0x1006 ,
  mm::node::kManufacturerDeviceName = 0x1008 , mm::node::kManufacturerSoftwareVersion = 0x100A , mm::node::kGuardTime = 0x100C , mm::node::kLifeTimeFactor = 0x100D ,
  mm::node::kStoreParameters = 0x1010 , mm::node::kRestoreDefaultParameters = 0x1011 , mm::node::kConsumerHeartbeatTime = 0x1016 , mm::node::kProducerHeartbeatTime = 0x1017 ,
  mm::node::kIdentity = 0x1018 , mm::node::kSynchronousCounterOverflowValue = 0x1019 , mm::node::kOsCommand = 0x1023 , mm::node::kOsCommandMode = 0x1024
}
 Generic CANopen device-profile (CiA301) object indices — present on any CoE device, independent of the CiA402 drive profile. Simple VAR objects are addressed at subindex 0; RECORD objects (0x1010, 0x1011, 0x1016, 0x1018, 0x1023) at their documented sub-entries. More...
 
enum class  mm::node::RestoreGroup : uint8_t { mm::node::kAll = 1 , mm::node::kCommunication = 2 , mm::node::kApplication = 3 , mm::node::kManufacturer = 4 }
 Which group of default parameters to restore (which 0x1011 sub-entry to command). The enum value is the sub-entry number, so it maps straight to the object subindex. More...
 

Functions

std::optional< RestoreGroupmm::node::parseRestoreGroup (std::string_view token)
 Parses a restore-group token ("all" / "communication" / "application" / "manufacturer") into a RestoreGroup. Returns std::nullopt for any other token.
 
constexpr std::string_view mm::node::toString (RestoreGroup group)
 The token naming group — the inverse of parseRestoreGroup, and the form the group takes on the wire. Never returns nullptr.
 
std::expected< ProfileDevice, std::string > mm::node::createProfileDevice (Device &device)
 Binds a generic device-profile view to device.