// private helper for magic property
 private void setprop_motorStatus(int newval)
 {
     if (_func == null)
     {
         return;
     }
     if (!(_online))
     {
         return;
     }
     if (newval == _MotorStatus_INVALID)
     {
         return;
     }
     if (newval == _motorStatus)
     {
         return;
     }
     // our enums start at 0 instead of the 'usual' -1 for invalid
     _func.set_motorStatus(newval - 1);
     _motorStatus = newval;
 }