code: def sim(self, args):
          
          if not self._started:
              raise ApplicationNotStarted("BACnet stack not running - use startApp()")
  
          # with self.this_application._lock: if use lock...won't be able to call read...
          args = args.split()
          addr, obj_type, obj_inst, prop_id, value = args[:5]
  
          if self.read("{} {} {} outOfService".format(addr, obj_type, obj_inst)):
              self.write(
                  "{} {} {} {} {}".format(addr, obj_type, obj_inst, prop_id, value)
              )
          else:
              try:
                  self.write(
                      "{} {} {} outOfService True".format(addr, obj_type, obj_inst)
                  )
              except NoResponseFromController:
                  pass
  
              try:
                  if self.read("{} {} {} outOfService".format(addr, obj_type, obj_inst)):
                      self.write(
                          "{} {} {} {} {}".format(
                              addr, obj_type, obj_inst, prop_id, value
                          )
                      )
                  else:
                      raise OutOfServiceNotSet()
              except NoResponseFromController:
                  pass
docs: Simulate I/O points by setting the Out_Of_Service property, then doing a 
          WriteProperty to the point's Present_Value.
  
          :param args: String with <addr> <type> <inst> <prop> <value> [ <indx> ] [ <priority> ]