Device constructor

Device(
  1. String deviceId,
  2. String deviceName,
  3. int state
)

Implementation

Device(this.deviceId, this.deviceName, int state) {
  switch (state) {
    case 1:
      this.state = SessionState.connecting;
      break;
    case 2:
      this.state = SessionState.connected;
      break;
    default:
      this.state = SessionState.notConnected;
      break;
  }
}