Home

Awesome

Octopus Simulator

Build Status

Octopus simulator consists of the simulators for testing Octopus adaptor.

Quick-start

To bring up all Octopus simulator, please apply the installer YAML file under deploy/e2e.

$ kubectl apply -f https://raw.githubusercontent.com/cnrancher/octopus-simulator/master/deploy/e2e/all_in_one.yaml

Simulators

Bluetooth Simulator

Bluetooth simulator is mocking a heart rate sensor, there are three GATT Services in this simulated peripheral:

The endianness of all property is LittleEndian.

Modbus Simulator

Modbus simulator is mocking a thermometer, the numerical accuracy is two decimal places, and the measurement is Kelvin absolute temperature and relative humidity.

The endianness of all property is BigEndian.

NameRegisterTypeTypePropertyAddressQuantityValue
SwitchCoilRegisterbooleanread/write11Triggers to mock, the default is true.
TemperatureHoldingRegisterfloat32read02Represents the realtime absolute temperature, unit is in kevin, its range is between 273.15 and 378.15.
HumidityHoldingRegisterfloat32read22Represents the humidity, unit is in %, its range is between 10 and 100.
High Temperature ThresholdHoldingRegisterint32read/write42Represents the threshold of absolute temperature, unit is in kevin, the default value is 324.
High Temperature AlarmCoilRegisterbooleanread01Indicates high temperature alarm. When the temperature exceeds the threshold, the high temperature alarm is true.
BatteryHoldingRegisterint8read61Represents the battery, uint is in %, the default value is 100.
ManufacturerHoldingRegisterstringread714Indicates the manufacturer.

MQTT Simulator

MQTT simulator is mocking kitchen door, kitchen light, living room light and bedroom light.

OPC-UA Simulator

OPC-UA simulator is open62541/open62541:1.0.

NameTypePropertyNodeIDValue
the answerInt32read/writens=1;s=the.answer42.
example bytestringByteStringread/writens=1;s=myByteString0x74657374313233(string is test123\0test123)
Boolean - 0Booleanreadns=1;i=43001random change
Int16 - 100Int16readns=1;i=43101random change
Uint16 - 200Uint16readns=1;i=43201random change
Int32 - 300Int32readns=1;i=43301random change
Uint32 - 400Uint32readns=1;i=43401random change
Int64 - 500Int64readns=1;i=43501random change
Uint64 - 600Uint64readns=1;i=43601random change
Float - 700Floatreadns=1;i=43701random change
Double - 800Doublereadns=1;i=43801random change
String - 900Stringreadns=1;i=43901random change
ByteString - 1100ByteStringreadns=1;i=44101random change

License

Copyright (c) 2020 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE file for details.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.