169 lines
4.0 KiB
JavaScript
169 lines
4.0 KiB
JavaScript
// Auto-generated. Do not edit!
|
|
|
|
// (in-package ur_msgs.srv)
|
|
|
|
|
|
"use strict";
|
|
|
|
const _serializer = _ros_msg_utils.Serialize;
|
|
const _arraySerializer = _serializer.Array;
|
|
const _deserializer = _ros_msg_utils.Deserialize;
|
|
const _arrayDeserializer = _deserializer.Array;
|
|
const _finder = _ros_msg_utils.Find;
|
|
const _getByteLength = _ros_msg_utils.getByteLength;
|
|
|
|
//-----------------------------------------------------------
|
|
|
|
|
|
//-----------------------------------------------------------
|
|
|
|
class SetPayloadRequest {
|
|
constructor(initObj={}) {
|
|
if (initObj === null) {
|
|
// initObj === null is a special case for deserialization where we don't initialize fields
|
|
this.payload = null;
|
|
}
|
|
else {
|
|
if (initObj.hasOwnProperty('payload')) {
|
|
this.payload = initObj.payload
|
|
}
|
|
else {
|
|
this.payload = 0.0;
|
|
}
|
|
}
|
|
}
|
|
|
|
static serialize(obj, buffer, bufferOffset) {
|
|
// Serializes a message object of type SetPayloadRequest
|
|
// Serialize message field [payload]
|
|
bufferOffset = _serializer.float32(obj.payload, buffer, bufferOffset);
|
|
return bufferOffset;
|
|
}
|
|
|
|
static deserialize(buffer, bufferOffset=[0]) {
|
|
//deserializes a message object of type SetPayloadRequest
|
|
let len;
|
|
let data = new SetPayloadRequest(null);
|
|
// Deserialize message field [payload]
|
|
data.payload = _deserializer.float32(buffer, bufferOffset);
|
|
return data;
|
|
}
|
|
|
|
static getMessageSize(object) {
|
|
return 4;
|
|
}
|
|
|
|
static datatype() {
|
|
// Returns string type for a service object
|
|
return 'ur_msgs/SetPayloadRequest';
|
|
}
|
|
|
|
static md5sum() {
|
|
//Returns md5sum for a message object
|
|
return 'd12269f931817591aa52047629ca66ca';
|
|
}
|
|
|
|
static messageDefinition() {
|
|
// Returns full string definition for message
|
|
return `
|
|
float32 payload
|
|
|
|
`;
|
|
}
|
|
|
|
static Resolve(msg) {
|
|
// deep-construct a valid message object instance of whatever was passed in
|
|
if (typeof msg !== 'object' || msg === null) {
|
|
msg = {};
|
|
}
|
|
const resolved = new SetPayloadRequest(null);
|
|
if (msg.payload !== undefined) {
|
|
resolved.payload = msg.payload;
|
|
}
|
|
else {
|
|
resolved.payload = 0.0
|
|
}
|
|
|
|
return resolved;
|
|
}
|
|
};
|
|
|
|
class SetPayloadResponse {
|
|
constructor(initObj={}) {
|
|
if (initObj === null) {
|
|
// initObj === null is a special case for deserialization where we don't initialize fields
|
|
this.success = null;
|
|
}
|
|
else {
|
|
if (initObj.hasOwnProperty('success')) {
|
|
this.success = initObj.success
|
|
}
|
|
else {
|
|
this.success = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
static serialize(obj, buffer, bufferOffset) {
|
|
// Serializes a message object of type SetPayloadResponse
|
|
// Serialize message field [success]
|
|
bufferOffset = _serializer.bool(obj.success, buffer, bufferOffset);
|
|
return bufferOffset;
|
|
}
|
|
|
|
static deserialize(buffer, bufferOffset=[0]) {
|
|
//deserializes a message object of type SetPayloadResponse
|
|
let len;
|
|
let data = new SetPayloadResponse(null);
|
|
// Deserialize message field [success]
|
|
data.success = _deserializer.bool(buffer, bufferOffset);
|
|
return data;
|
|
}
|
|
|
|
static getMessageSize(object) {
|
|
return 1;
|
|
}
|
|
|
|
static datatype() {
|
|
// Returns string type for a service object
|
|
return 'ur_msgs/SetPayloadResponse';
|
|
}
|
|
|
|
static md5sum() {
|
|
//Returns md5sum for a message object
|
|
return '358e233cde0c8a8bcfea4ce193f8fc15';
|
|
}
|
|
|
|
static messageDefinition() {
|
|
// Returns full string definition for message
|
|
return `
|
|
bool success
|
|
|
|
|
|
`;
|
|
}
|
|
|
|
static Resolve(msg) {
|
|
// deep-construct a valid message object instance of whatever was passed in
|
|
if (typeof msg !== 'object' || msg === null) {
|
|
msg = {};
|
|
}
|
|
const resolved = new SetPayloadResponse(null);
|
|
if (msg.success !== undefined) {
|
|
resolved.success = msg.success;
|
|
}
|
|
else {
|
|
resolved.success = false
|
|
}
|
|
|
|
return resolved;
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
Request: SetPayloadRequest,
|
|
Response: SetPayloadResponse,
|
|
md5sum() { return '7f12eb632882cb73e5721178d0073e39'; },
|
|
datatype() { return 'ur_msgs/SetPayload'; }
|
|
};
|