toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'name'] = this.name;
  if (json[r'interval'] == null) {
    json[r'interval'] = null;
  } else {
    json[r'interval'] = this.interval;
  }

  json[r'ret_policy'] = this.retPolicy;
  json[r'memoryArea'] = this.memoryArea;
  json[r'dataType'] = this.dataType;
  json[r'memoryAddress'] = this.memoryAddress;
  json[r'permissions'] = this.permissions;
  json[r'accessLevel'] = this.accessLevel;
  json[r'category'] = this.category;

  json[r'topic'] = this.topic;

  json[r'topic'] = null;
  if (this.description != null) {
    json[r'description'] = this.description;
  } else {
    json[r'description'] = null;
  }
  if (this.byteOrder != null) {
    json[r'byteOrder'] = this.byteOrder;
  } else {
    json[r'byteOrder'] = null;
  }
  if (this.min != null) {
    json[r'min'] = this.min;
  } else {
    json[r'min'] = null;
  }
  if (this.max != null) {
    json[r'max'] = this.max;
  } else {
    json[r'max'] = null;
  }
  if (this.unit != null) {
    json[r'unit'] = this.unit;
  } else {
    json[r'unit'] = null;
  }
  if (this.tags != null) {
    json[r'tags'] = this.tags;
  } else {
    json[r'tags'] = null;
  }
  if (this.activationEdge != null) {
    json[r'activation_edge'] = this.activationEdge;
  } else {
    json[r'activation_edge'] = null;
  }
  if (this.timeout != null) {
    json[r'timeout'] = this.timeout;
  } else {
    json[r'timeout'] = null;
  }
  if (this.priority != null) {
    json[r'priority'] = this.priority;
  } else {
    json[r'priority'] = null;
  }
  if (this.scale != null) {
    json[r'scale'] = this.scale;
  } else {
    json[r'scale'] = null;
  }
  if (this.offset != null) {
    json[r'offset'] = this.offset;
  } else {
    json[r'offset'] = null;
  }
  return json;
}