theta-ble-client-react-native
Version:
This library provides a way to control RICOH THETA using
125 lines • 4.36 kB
TypeScript
import type { NotifyError, ThetaDevice } from '../theta-device';
import { ThetaService } from './theta-service';
import { BleServiceEnum, CameraPowerEnum, ChargingStateEnum, CommandErrorDescriptionEnum } from './values';
import type { PluginControl } from './ble';
/**
* Camera Status Command Service
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
*/
export declare class CameraStatusCommand extends ThetaService {
readonly service: BleServiceEnum;
readonly device: ThetaDevice;
constructor(device: ThetaDevice);
/**
* Acquires the battery level of the camera.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: 875FC41D-4980-434C-A653-FD4A4D4410C4
*
* @returns battery level. 0 to 100
*/
getBatteryLevel(): Promise<number>;
/**
* Set the battery level notification.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: 875FC41D-4980-434C-A653-FD4A4D4410C4
*
* @param callback Notification function
*/
setBatteryLevelNotify(callback?: (value?: number, error?: NotifyError) => void): Promise<void>;
/**
* Acquires the charging state of the camera.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: 5429B6A0-66D6-491B-B906-902737D5442F
*
* @returns charging state
*/
getBatteryStatus(): Promise<ChargingStateEnum>;
/**
* Set the charging state notification.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: 5429B6A0-66D6-491B-B906-902737D5442F
*
* @param callback Notification function
*/
setBatteryStatusNotify(callback?: (value?: ChargingStateEnum, error?: NotifyError) => void): Promise<void>;
/**
* Acquires the camera's start-up status.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: B58CE84C-0666-4DE9-BEC8-2D27B27B3211
*
* @returns start-up status
*/
getCameraPower(): Promise<CameraPowerEnum>;
/**
* Set the camera's start-up status.
*
* When the camera is turned off or put to sleep, it is necessary to reauthorize from connect.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: B58CE84C-0666-4DE9-BEC8-2D27B27B3211
*
* @param value start-up status
*/
setCameraPower(value: CameraPowerEnum): Promise<any>;
/**
* Set the camera's start-up status notification.
*
* When the camera is turned off or put to sleep, it is necessary to reauthorize from connect.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: B58CE84C-0666-4DE9-BEC8-2D27B27B3211
*
* @param callback Notification function
*/
setCameraPowerNotify(callback?: (value?: CameraPowerEnum, error?: NotifyError) => void): Promise<void>;
/**
* Set the camera's error description in detail notification.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: 4B03D05E-02D2-412B-A20B-578AE82B9C01
*
* @param callback Notification function
*/
setCommandErrorDescriptionNotify(callback?: (value?: CommandErrorDescriptionEnum, error?: NotifyError) => void): Promise<void>;
/**
* Acquires the plugin power status.
*
* RICOH THETA V firmware v2.21.1 or later.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: A88732D5-6786-4312-9364-B9A4514DC123
*
* @returns plugin control
*/
getPluginControl(): Promise<PluginControl>;
/**
* Starts or stops plugin.
*
* RICOH THETA V firmware v2.21.1 or later.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: A88732D5-6786-4312-9364-B9A4514DC123
*
* @param value plugin control
* @returns
*/
setPluginControl(value: PluginControl): Promise<any>;
/**
* Set the plugin power status notification.
*
* RICOH THETA V firmware v2.21.1 or later.
*
* Service: 8AF982B1-F1FF-4D49-83F0-A56DB4C431A7
* Characteristic: A88732D5-6786-4312-9364-B9A4514DC123
*
* @param callback Notification function
*/
setPluginControlNotify(callback?: (value?: PluginControl, error?: NotifyError) => void): Promise<void>;
}
//# sourceMappingURL=camera-status-command.d.ts.map