def on_init(self): self.camera = fel.drivers.CameraFactory.new_camera( self.camera_descriptor) s = self.camera.init() if not s.ok(): fel.log(fel.ERROR, s.error_message()) sys.exit(1) # You can set camera settings here. camera_settings = fel.drivers.CameraSettings() s = self.camera.set_camera_settings(camera_settings) fel.log_if(fel.ERROR, not s.ok(), s.error_message()) message = CameraSettingsInfoMessage() s = self.camera.get_camera_settings_info(message) if s.ok(): print(message) else: fel.log(fel.ERROR, s.error_message())
def on_camera_error(self, status): fel.log_if(fel.ERROR, not status.ok(), status.error_message())
def on_request_unregister(self, status): print("GrpcClientNode.on_request_unregister()") fel.log_if(fel.ERROR, not status.ok(), status.error_message())
def on_request_unpublish(self, status): print("ProtobufPublishingNode.on_request_unpublish()") fel.log_if(fel.ERROR, not status.ok(), status.error_message())
def on_publish(self, channel_type, status): print("ProtobufPublishingNode.on_publish() from {}".format( ChannelDef.Type.Name(channel_type))) fel.log_if(fel.ERROR, not status.ok(), status.error_message())
def stop_camera(self): s = self.camera.stop() fel.log_if(fel.ERROR, not s.ok(), s.error_message())
def on_request_publish(self, status): fel.log_if(fel.ERROR, not status.ok(), status.error_message()) self.repeating_publish()
def on_request_unsubscribe(self, status): print("ProtobufSubscribingNode.on_request_unsubscribe()") fel.log_if(fel.ERROR, not status.ok(), status.error_message())