Improve comments in mjplugin.h, align to header standard (column 35).

PiperOrigin-RevId: 525868504
Change-Id: I8edfcea737e6e94458015a0e4fa6522cf89a1230
This commit is contained in:
Yuval Tassa
2023-04-20 15:38:31 -07:00
committed by Copybara-Service
parent 2d69b158aa
commit 0295d972cb
2 changed files with 23 additions and 23 deletions
+11 -11
View File
@@ -1198,26 +1198,26 @@ struct mjModel_ {
};
typedef struct mjModel_ mjModel;
struct mjpResourceProvider_ {
const char* prefix; // prefix for match against a resource name
mjfOpenResource open; // opening callback
mjfReadResource read; // reading callback
mjfCloseResource close; // closing callback
void* data; // opaque data pointer (resource invariant)
const char* prefix; // prefix for match against a resource name
mjfOpenResource open; // opening callback
mjfReadResource read; // reading callback
mjfCloseResource close; // closing callback
void* data; // opaque data pointer (resource invariant)
};
typedef struct mjpResourceProvider_ mjpResourceProvider;
typedef enum mjtPluginCapabilityBit_ {
mjPLUGIN_ACTUATOR = 1<<0,
mjPLUGIN_SENSOR = 1<<1,
mjPLUGIN_PASSIVE = 1<<2,
mjPLUGIN_ACTUATOR = 1<<0, // actuator forces
mjPLUGIN_SENSOR = 1<<1, // sensor measurements
mjPLUGIN_PASSIVE = 1<<2, // passive forces
} mjtPluginCapabilityBit;
struct mjpPlugin_ {
const char* name; // globally unique name identifying the plugin
const char* name; // globally unique name identifying the plugin
int nattribute; // number of configuration attributes
const char* const* attributes; // name of configuration attributes
int capabilityflags; // bitfield of mjtPluginCapabilityBit specifying plugin capabilities
int needstage; // an mjtStage enum value specifying the sensor computation stage
int capabilityflags; // plugin capabilities: bitfield of mjtPluginCapabilityBit
int needstage; // sensor computation stage (mjtStage)
// number of mjtNums needed to store the state of a plugin instance (required)
int (*nstate)(const mjModel* m, int instance);
+12 -12
View File
@@ -36,11 +36,11 @@ typedef void (*mjfCloseResource)(mjResource* resource);
// struct describing a single resource provider
struct mjpResourceProvider_ {
const char* prefix; // prefix for match against a resource name
mjfOpenResource open; // opening callback
mjfReadResource read; // reading callback
mjfCloseResource close; // closing callback
void* data; // opaque data pointer (resource invariant)
const char* prefix; // prefix for match against a resource name
mjfOpenResource open; // opening callback
mjfReadResource read; // reading callback
mjfCloseResource close; // closing callback
void* data; // opaque data pointer (resource invariant)
};
typedef struct mjpResourceProvider_ mjpResourceProvider;
@@ -48,19 +48,19 @@ typedef struct mjpResourceProvider_ mjpResourceProvider;
//---------------------------------- Plugins -------------------------------------------------------
typedef enum mjtPluginCapabilityBit_ {
mjPLUGIN_ACTUATOR = 1<<0,
mjPLUGIN_SENSOR = 1<<1,
mjPLUGIN_PASSIVE = 1<<2,
mjPLUGIN_ACTUATOR = 1<<0, // actuator forces
mjPLUGIN_SENSOR = 1<<1, // sensor measurements
mjPLUGIN_PASSIVE = 1<<2, // passive forces
} mjtPluginCapabilityBit;
struct mjpPlugin_ {
const char* name; // globally unique name identifying the plugin
const char* name; // globally unique name identifying the plugin
int nattribute; // number of configuration attributes
const char* const* attributes; // name of configuration attributes
int capabilityflags; // bitfield of mjtPluginCapabilityBit specifying plugin capabilities
int needstage; // an mjtStage enum value specifying the sensor computation stage
int capabilityflags; // plugin capabilities: bitfield of mjtPluginCapabilityBit
int needstage; // sensor computation stage (mjtStage)
// number of mjtNums needed to store the state of a plugin instance (required)
int (*nstate)(const mjModel* m, int instance);
@@ -112,7 +112,7 @@ typedef struct mjpPlugin_ mjpPlugin;
#endif // !defined(mjEXTERNC)
// NOLINTBEGIN(runtime/int)
#define mjPLUGIN_LIB_INIT \
#define mjPLUGIN_LIB_INIT \
static void _mjplugin_dllmain(void); \
mjEXTERNC int __stdcall mjDLLMAIN(void* hinst, unsigned long reason, void* reserved) { \
if (reason == 1) { \