中文简体 English
- IvySdkManager
- Singleton object
- Initialization method
- Get version information
- Set P2P server region
- Set Sdk log information
- Stop LAN Search
- Restart LAN search
- Search for LAN devices
- EZLink 3.0 (IPC scan code distribution network)
- Get the device factory password through the device UID
- Determine device type by device UID
- IvyCamera
- Initialize
- Initialize the IvyCamera object
- Attributes
- Device handle
- Device UID
- device username
- device password
- Device handle status
- Connection management
- Login Camera
- Log out of Camera
- Release Camera
- Update username and password
- Clear cached device information
- Device Information
- Get device capability level
- Get device information
- Modify device username and password
- Screen Settings
- Get mirror rollover status
- Set mirror status
- Set rollover state
- Get IR light status
- Set IR light status
- Get the resolution types supported by the setting
- Get the current sharpness type
- Set camera resolution
- Get OSD setting status
- Set OSD setting status
- Get camera WDR switch status
- Set camera WDR switch status
- set device name
- PTZ PTZ
- PTZ control
- Get preset list
- Go to the specified preset point
- Add preset point
- delete preset
- Vertical cruise
- Horizontal cruise
- cruise
- stop cruising
- Alarm settings
- Get motion detection information
- Set motion detection information
- Get human detection information
- Set human detection information
- Get human detection device information
- Set Human Detection License
- Get sound detection
- Set sound detection
- Network settings
- Get device Wi-Fi configuration
- Get Wi-Fi List
- Setting up Wi-Fi
- Get network adaptive switch status
- Set network adaptive switch state
- time setting
- Get device system time
- Set system time
- Sync phone time to device
- SD card related
- Get device SD card information
- Format SD card
- Get SD card recording list
- Paging to get the SD card recording list
- Get SD card picture list
- Download SD card image
- Get scheduled recording configuration
- Set scheduled recording configuration
- Other controls
- Start recording
- stop recording
- Get camera volume
- Set camera volume
- Get the intercom volume
- Set the intercom volume
- reboot device
- Get power frequency
- Set the power frequency
- Get sleep state
- Wake up the device
- Hibernate the device
- Get indicator switch status
- Set indicator switch status
- Get prompt voice switch status
- Set prompt voice switch state
- Cloud configuration
- Online upgrade
- Set cloud storage configuration
- Set rich media push configuration
- Set text push configuration
- General commands
- Common commands
- General command, send CGI command
- Event Management
- Add an event observer
- remove an observer
- IvyPlayer Live Streaming
- IvyPlayer Live Streaming Class
- live streaming
- Stop play
- Open Intercom
- close intercom
- Audio switch
- acting
- IvyPlayerDelegate Live Streaming Agent
- decoded to a frame of UIImage image
- Decode to a frame of an image of the specified format
- Command result
- Play traffic
- IvySDPlayer SD card playback
- IvySDPlayer SD card playback class
- Play SD card video
- Pause playback
- continue playing
- Set playback position
- Stop play
- Audio switch
- acting
- IvySDPlayerDelegate SD card playback agent
- decoded to a frame of UIImage image
- Decode to a frame of an image of the specified format
- Command result
- play time
- Buffering progress
- Play traffic
- IvySDDownloader SD card video download
- IvySDDownloader class
- IvySDDownloader singleton
- Download SD card video file
- Cancel current download
- acting
- IvySDDownloaderDelegate delegate
- SD card video download successfully
- SD card video download progress
- SD card video download failed
- IvyVoicePlayer Sonic Distribution Network
- IvyVoicePlayer class
- Initialization method
- Play
- Stop play
- acting
- IvyVoicePlayerDelegate Delegate
- Sonic distribution network completed
- Sonic distribution network abnormal
- Ivy data model
- IvyDevAbility Device Capability Set
- property definitions
- IvyDevAbility (Helper) Device Ability Set Helper
- Whether to support sd card
- Whether to support outdoor
- Whether to support pt
- Whether to support zoom
- Whether rs485 is supported
- Whether ioAlarm is supported
- Whether to support onvif
- Whether p2p is supported
- Whether to support monitoring (device prompt volume adjustment)
- Whether to support intercom
- Whether to support full-duplex intercom
- Whether to support video parameter network adaptation
- Whether to support resolution switching and primary and secondary stream switching
- Whether to support region selection
- Whether to support one-key calling
- Whether to support night vision plan
- Whether to support SD card image download
- Whether to support dropbox cloud storage
- Whether to support Baidu push
- Whether to support Foscam push
- Whether to support Foscam storage
- Whether to support Foscam rich media push
- Alexa support
- Whether to support 7*24 hours cloud storage
- Whether to support alarm recording duration setting
- Whether to support APP preset cruise
- Whether to support out-of-frame detection
- Whether to support sound detection
- Whether to support temperature detection
- Whether to support humidity detection
- Whether to support PIR detection
- Whether to support IV detection
- Whether to support human body detection – Aihua Yingtong
- Whether to support human detection – Shankou
- Do you support nursery rhymes?
- Whether to support chip encryption
- Whether SoftAP is supported
- Whether to support EZLink
- Whether to support PPPoE
- Whether to support night vision infrared function
- Whether to support the recording function
- Whether to support scheduled restart
- Whether to support arm and disarm
- Whether to support indicator switch
- Whether to support night light switch
- Whether to support speaker volume control
- Whether to support HDR
- Whether to support voice prompt switch
- Whether to support Shenma full-duplex algorithm
- Whether to support dual motor auto focus
- Whether to support the PTZ cruise guard position
- Whether to support device name Unicode
- Whether to support device sleep
- IvyDevInfo Device Information
- Equipment type
- Platform type
- sensor type
- wifi type
- language
- product name
- Equipment name
- Application firmware version number
- System firmware version number
- serial number
- Device UID
- MAC address
- OEM code
- IvyDevLan LAN Search
- Mac address
- Equipment name
- IP address
- NDS
- Type 0: FOSIPC_H264 1: FOSIPC_MJ 2: FOSIPC_UNKNOW
- port
- DHCP is enabled
- Device UID
- IvyMotionDetect motion detection alarm protocol
- Motion detection alarm type
- IvyMotionDetectObject0 Motion detection alarm model 1
- switch
- Motion detection switch
- PIR detection switch
- linkage
- Capture interval seconds
- Sensitivity
- trigger interval
- Sunday
- on Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Detection alarm area
- IvyMotionDetectObject1 Motion detection alarm model 2
- switch
- Motion detection switch
- PIR detection switch
- linkage
- Capture interval seconds
- trigger interval
- Sunday
- on Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Detection area
- First zone alert sensitivity
- Second zone alarm sensitivity
- The third zone alarm sensitivity
- Whether to enable the first area detection alarm
- Whether to enable the second area detection alarm
- Whether to enable the third area detection alarm
- IvyAudioDetect sound detection alarm
- switch
- linkage
- Sensitivity
- trigger interval
- Capture interval
- Sunday
- on Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- IvyPedestrianDetect Human detection alarm
- switch
- Tracking switch
- Linked alarm
- Sensitivity
- Capture time interval
- trigger interval
- IvyScheduleRecordConfig Schedule recording configuration
- Whether to enable scheduled recording
- Recording level
- Recording processing method after the space is full
- whether to include audio
- Video stream type
- Sunday
- on Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- IvySDInfo SD card information
- Whether there is an SD card
- SD remaining space
- SD card total space
- IvyRecordList SD card recording list
- Total number of videos
- Video list
- IvyRecordObject SD Card Recording Information Protocol
- Recording object class type
- IvyRecordObject0 SD card recording information model 1
- channel number
- Recording start time
- Recording end time
- Recording Type
- IvyRecordObject1 SD card recording information model 2
- Recording path
- IvyPictureList SD card picture list
- channel number
- Total
- current count
- photo list
- IvyPictureInfo SD card picture
- Image Format
- timestamp
- Image Type
- IvyDevTime device time
- year
- moon
- day
- Hour
- minute
- Second
- ntp server
- date format
- DST duration
- Whether there is daylight saving time
- Time format
- time source
- Time zone
- IvyWiFiDetail Wi-Fi Information
- SSID
- Mac
- Whether to encrypt
- Signal quality
- model
- encryption type
- IvyWiFiConfig Wi-Fi Search Information
- SSID
- Wi-Fi encryption type
- IvyStreamParam video stream
- GOP
- bitRate
- frameRate
- isVBR
- resolution
- IvyPresetPoint preset point
- result
- Preset point name
- IvyOSDSettings OSD
- Whether to display OSD
- whether to show timestamp
- Whether to display the device name
- Whether to display temperature and humidity
- dispPos
IvySdkManager
Singleton object
Interface Description
singleton object
+ (IvySdkManager *)shared;
return
singleton object
Sample code
Initialization method
Interface Description
initialization method
- (void)initializer;
Sample code
[[IvySdkManager shared] initializer];
Get version information
Interface Description
Get version information
- (NSString *)versionInfo;
return
Version Information
Sample code
NSString *versionInfo = [IvySdkManager shared].versionInfo;
NSLog(@"... version:%@", versionInfo);
Output:
...version:1.0.6_35_1.0.3.166
Set P2P server region
Interface Description
Set P2P server region
- (void)setP2PRegion:(NSInteger)region;
Parameter Description
parameter | description |
---|---|
region | region (0: China, 1: non-China) |
Example Code
[[IvySdkManager shared] setP2PRegion:1];
Set Sdk log information
Interface Description
Set SDK log information
- (void)setLog:(NSInteger)level filepath:(NSString *)filepath maxSize:(NSUInteger)maxSize;
Parameter Description
Parameters | Description |
---|---|
level | Log level (0: NO 1: Error 2:Debug 3: All) |
filepath | log file path |
maxSize | Maximum file size (M) |
Sample code
NSString *filepath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:@"AppSdk.txt"];
[[IvySdkManager shared] setLog:3 filepath:filepath maxSize:100];
Stop LAN Search
Interface Description
Stop LAN Search
- (void)stopDiscovery;
Sample code
Restart LAN search
Interface Description
Restart LAN Search
- (void)restartDiscovery;
Sample code
Search for LAN devices
Interface Description
Search for LAN devices
- (void)searchDevices:(void(^)(NSArray<IvyDevLan *> *devices))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[[IvySdkManager shared] searchDevices:^(NSArray<IvyDevLan *> * _Nonnull devices) {
for (IvyDevLan *obj in devices) {
NSLog(@"...deviceUID:%@", obj.uid);
}
}];
EZLink 3.0 (IPC scan code distribution network)
Interface Description
EZLink 3.0 (IPC scan code distribution network)
- (NSString *)qrCodeString:(NSString *)SSID password:(NSString *)password;
Parameter Description
Parameters | Description |
---|---|
SSID | Router SSID |
password | router password |
return
distribution string
instruction
According to the string, generate the corresponding QR code for the configuration network of IPC
Sample code
- (UIImage *)qrCodeImageFromString:(NSString *)qrString {
NSData *data = [qrString dataUsingEncoding:NSUTF8StringEncoding];
CIFilter *filter = [CIFilter filterWithName:@"CIQRCodeGenerator"];
[filter setValue:data forKey:@"inputMessage"];
[filter setValue:@"L" forKey:@"inputCorrectionLevel"];
CIImage *ciimage = filter.outputImage;
CGFloat scaleX = 200 / ciimage.extent.size.width;
CGFloat scaleY = 200 / ciimage.extent.size.height;
CIImage *resizeImage = [ciimage imageByApplyingTransform:CGAffineTransformMakeScale(scaleX, scaleY)];
UIImage *image = [[UIImage alloc] initWithCIImage:resizeImage scale:[[UIScreen mainScreen] scale] orientation:UIImageOrientationDown];
return image;
}
NSString *SSID = @"My_WiFi";
NSString *password = @"1234567890";
NSString *qrCodeString = [[IvySdkManager shared] qrCodeString:SSID password:password];
UIImage *image = [self qrCodeImageFromString:qrCodeString];
Get the device factory password through the device UID
Interface Description
Obtain the device factory password through the device UID
- (NSString *)resetPasswordByDeviceUID:(nonnull NSString *)deviceUID;
Parameter Description
Parameters | Description |
---|---|
deviceUID | Device UID |
Sample code
NSString *deviceUID = kDeviceUID;
NSString *resetPwd = [[IvySdkManager shared] resetPasswordByDeviceUID:deviceUID];
NSLog(@"... resetPwd:%@", resetPwd);
Output:
... resetPwd:e8e3d757
Determine device type by device UID
Interface Description
Determine device type by device UID
- (IvyDeviceType)deviceTypeByDeviceUID:(nonnull NSString *)deviceUID;
Parameter Description
Parameters | Description |
---|---|
deviceUID | Device UID |
Sample code
NSString *deviceUID = kDeviceUID;
IvyDeviceType type = [[IvySdkManager shared] deviceTypeByDeviceUID:deviceUID];
IvyCamera
Initialize
Initialize the IvyCamera object
Interface Description
Initialize the IvyCamera object with the device UID, and the user name and password corresponding to the device
- (instancetype)initWithDeviceUID:(NSString *)deviceUID username:(NSString *)username password:(NSString *)password;
Parameter Description
Parameters | Description |
---|---|
deviceUID | Device UID |
username | Device username |
password | Device password |
return
IvyCamera object
Sample code
NSString *deviceUID = @"5RKNUEBGCY3821CHZZZZ9Y9I";
NSString *username = @"admin";
NSString *password = @"uKsa72";
IvyCamera *obj = [[IvyCamera alloc] initWithDeviceUID:deviceUID username:username password:password];
Attributes
Device handle
Property description
device handle
@property (nonatomic, assign, readonly) IVYHANDLE handle;
Device UID
Property description
Device UID
@property (nonatomic, strong, readonly) NSString *deviceUID;
device username
Property description
device username
@property (nonatomic, strong, readonly) NSString *username;
device password
Property description
device password
@property (nonatomic, strong, readonly) NSString *password;
Device handle status
Property description
Device handle status
@property (nonatomic, assign, readonly) IVYIO_HANDLE_STATE handleState;
Connection management
Login Camera
Interface Description
LoginCamera
- (void)loginCamera:(void(^)(IVYIO_HANDLE_STATE handleState, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | Login result |
Sample code
[self.ivyCamera loginCamera:^(IVYIO_HANDLE_STATE handleState, IVYIO_RESULT cmdResult) {
if (IVYIO_HANDLE_STATE_ONLINE == handleState) {
NSLog(@"...Online");
} else {
NSLog(@"...Offline");
}
}];
Log out of Camera
Interface Description
Log out of Camera
- (void)logoutCamera;
Sample code
[self.ivyCamera logoutCamera];
Release Camera
Interface Description
Release Camera
- (void)destroyCamera;
Sample code
[self.ivyCamera destroyCamera];
Update username and password
Interface Description
Update username and password
- (BOOL)updateUsername:(NSString *)username password:(NSString *)password;
Parameter Description
Parameters | Description |
---|---|
username | Device username |
password | Device password |
return
whether succeed
Sample code
NSString *newUsername = @"a";
NSString *newPassword = @"abc123";
[self.ivyCamera updateUsername:newUsername password:newPassword];
Clear cached device information
Interface Description
Clear cached device information
- (void)resetConfiguration;
Sample code
[self.ivyCamera resetConfiguration];
Device Information
Get device capability level
Interface Description
Get device capability level
- (void)getDevAbility:(void(^)(IvyDevAbility *devAbility, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getDevAbility:^(IvyDevAbility * _Nonnull devAbility, IVYIO_RESULT cmdResult) {
}];
Get device information
Interface Description
Get device information
- (void)getDevInfo:(void(^)(IvyDevInfo *devInfo, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getDevInfo:^(IvyDevInfo * _Nonnull devInfo, IVYIO_RESULT cmdResult) {
if (cmdResult == IVYIO_RESULT_OK) {
NSLog(@"... mac:%@", devInfo.mac);
}
}];
Modify device username and password
Interface Description
Modify device username and password
- (void)modifyUserNameAndPassword:(NSString *)newUserName newPassword:(NSString *)newPassword onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
newUserName | new user name |
newPassword | new password |
resultBlock | result |
Sample code
NSString *username = @"a";
NSString *password = @"abc123";
[self.ivyCamera modifyUserNameAndPassword:username newPassword:password onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Screen Settings
Get mirror rollover status
Interface Description
Get mirror rollover status
- (void)getVideoMirrorFlip:(void(^)(BOOL isMirror, BOOL isFlip, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
Set mirror status
Interface Description
Set mirror status
- (void)setMirrorVideo:(BOOL)isMirror onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
isMirror | Enable mirroring |
resultBlock | result |
Sample code
[self.ivyCamera setMirrorVideo:YES onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {}];
Set rollover state
Interface Description
set flip state
- (void)setFlipVideo:(BOOL)isFlip onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
isFlip | Enable flip |
resultBlock | result |
Sample code
[self.ivyCamera setFlipVideo:NO onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {}];
Get IR light status
Interface Description
Get IR light status
- (void)getDayNightConfig:(void(^)(NSInteger mode, BOOL onoff, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
Set IR light status
Interface Description
Set IR light status
- (void)setDayNightConfig:(BOOL)onoff mode:(NSInteger)mode onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
onoff | Whether to turn on the infrared light (only in manual mode, onoff will be effective) |
mode | Status of the IR light (0: Auto 1: Manual 2: Schedule) |
resultBlock | result |
Sample code
BOOL onoff = YES;
NSInteger mode = 1;
[self.ivyCamera setDayNightConfig:onoff mode:mode onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get the resolution types supported by the setting
Interface Description
Get the resolution types supported by the setting
- (void)getSupportedStreamTypes:(void(^)(NSArray *types, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
types array value referenceIvyDefinitionType
Sample code
[self.ivyCamera getSupportedStreamTypes:^(NSArray * _Nonnull types, IVYIO_RESULT cmdResult) {
NSLog(@"... cmdResult:%@, types:%@", @(cmdResult), types);
}];
Output:
...cmdResult:0, types:(
2,
1,
0
)
Get the current sharpness type
Interface Description
Get the current sharpness type
- (void)getStreamType:(void(^)(IvyDefinitionType streamType, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getStreamType:^(IvyDefinitionType streamType, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, streamType:%@", @(cmdResult), @(streamType));
}];
Output:
...cmdResult:0, streamType:2
Set camera resolution
Interface Description
Set camera sharpness
- (void)setStreamType:(IvyDefinitionType)streamType onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
streamType | Clarity |
resultBlock | result |
Sample code
IvyDefinitionType type = IvyDefinitionHD;
[self.ivyCamera setStreamType:type onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get OSD setting status
Interface Description
Get OSD setting status
- (void)getOSDSettings:(void(^)(IvyOSDSettings *obj, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getOSDSettings:^(IvyOSDSettings * _Nonnull obj, IVYIO_RESULT cmdResult) {
if (cmdResult == IVYIO_RESULT_OK) {
NSLog(@"...isEnableTimeStamp:%@", @(obj.isEnableTimeStamp));
}
}];
Output:
...isEnableTimeStamp:1
Set OSD setting status
Interface Description
Set OSD setting status
- (void)setOSDSettings:(IvyOSDSettings *)obj onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
obj | OSD object |
resultBlock | result |
Sample code
IvyOSDSettings *obj = [IvyOSDSettings new];
obj.isEnableTimeStamp = YES;
obj.isEnableDevName = NO;
[self.ivyCamera setOSDSettings:obj onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get camera WDR switch status
Interface Description
Get camera WDR switch status
- (void)getCameraWDRState:(void(^)(NSInteger mode, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
mode: 0 off, 1 on
Sample code
[self.ivyCamera getCameraWDRState:^(NSInteger mode, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, mode:%@", @(cmdResult), @(mode));
}];
Set camera WDR switch status
Interface Description
Set the camera WDR switch status
- (void)setCameraWDRState:(NSInteger)mode onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
mode | state |
resultBlock | result |
Sample code
[self.ivyCamera setCameraWDRState:1 onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
set device name
Interface Description
set device name
- (void)setDevName:(NSString *)devName onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
devName | name |
resultBlock | result |
instruction
devName If the capability set (enableUnicodeDevName) does not support Unicode, you can only set the following characters “^[A-Za-z0-9_\-\s]{1,20}$”.
Sample code
PTZ PTZ
PTZ control
Interface Description
PTZ control
- (void)setPTZCmd:(IVY_PTZ_CMD)ptzCmd onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
ptzCmd | Control Commands |
resultBlock | result |
Sample code
IVY_PTZ_CMD ptzCmd = IVY_PTZ_MOVE_UP;
[self.ivyCamera setPTZCmd:ptzCmd onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {}];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.25 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.ivyCamera setPTZCmd:IVY_PTZ_STOP onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {}];
});
Get preset list
Interface Description
Get a list of presets
- (void)getPresetPointList:(void(^)(IvyPresetPoint *presetPoint, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getPresetPointList:^(IvyPresetPoint * _Nonnull presetPoint, IVYIO_RESULT cmdResult) {
NSLog(@"... cmdResult:%@, obj:%@", @(cmdResult), presetPoint.pointNames);
}];
Output:
...cmdResult:0, obj:(
TopMost,
BottomMost,
LeftMost,
RightMost
)
Go to the specified preset point
Interface Description
Go to the specified preset point
- (void)goToPresetPoint:(NSString *)pointName onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
pointName | Preset point |
resultBlock | result |
Sample code
NSString *pointName = @"RightMost";
[self.ivyCamera goToPresetPoint:pointName onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Add preset point
Interface Description
Add preset point
- (void)addPresetPoint:(NSString *)pointName onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
pointName | Preset point |
resultBlock | result |
Sample code
NSString *pointName = @"door";
[self.ivyCamera addPresetPoint:pointName onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
delete preset
Interface Description
delete preset
- (void)deletePresetPoint:(NSString *)pointName onCompletion:(void(^)(IvyPresetPoint *presetPoint, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
pointName | Preset point |
resultBlock | result |
Sample code
NSString *pointName = @"door";
[self.ivyCamera deletePresetPoint:pointName onCompletion:^(IvyPresetPoint * _Nonnull presetPoint, IVYIO_RESULT cmdResult) {
NSLog(@"... cmdResult:%@, obj:%@", @(cmdResult), presetPoint.pointNames);
}];
Vertical cruise
Interface Description
vertical cruise
- (void)startVerticalCruise:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera startVerticalCruise:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Horizontal cruise
Interface Description
horizontal cruise
- (void)startHorizontalCruise:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera startHorizontalCruise:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
cruise
Interface Description
fixed-point cruise
- (void)startPresetPointCruise:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
This mode requires at least 2 preset positions
Sample code
[self.ivyCamera startPresetPointCruise:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
stop cruising
Interface Description
stop cruising
- (void)stopCruise:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera stopCruise:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Alarm settings
Get motion detection information
Interface Description
Get motion detection information
- (void)getMotionDetectConfig:(void(^)(id<IvyMotionDetect> _Nullable config, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
config needs to judge the type according to the type and use the corresponding object
Sample code
[self.ivyCamera getMotionDetectConfig:^(id<IvyMotionDetect> _Nullable config, IVYIO_RESULT cmdResult) {
if (IVYIO_RESULT_OK == cmdResult) {
switch(config.type) {
case IvyMotionDetectType0: {
IvyMotionDetectObject0 *obj = (IvyMotionDetectObject0 *)config;
break;
}
case IvyMotionDetectType1: {
IvyMotionDetectObject1 *obj = (IvyMotionDetectObject1 *)config;
}
break;
}
} else {
}
}];
Set motion detection information
Interface Description
Set motion detection information
- (void)setMotionDetectConfig:(id<IvyMotionDetect>)config onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
config | DevMotionDetect object |
resultBlock | result |
Sample code
IvyMotionDetectObject1 *obj = self.motionDetectObject1;
[self.ivyCamera setMotionDetectConfig:obj onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get human detection information
Interface Description
Obtain human detection information
- (void)getPedestrianDetectConfig:(void(^)(IvyPedestrianDetect *config, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getPedestrianDetectConfig:^(IvyPedestrianDetect * _Nonnull config, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, config:%@", @(cmdResult), config);
if (cmdResult != IVYIO_RESULT_OK) { return; }
config.isEnable = !config.isEnable;
[self.ivyCamera setPedestrianDetectConfig:config onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
}];
Set human detection information
Interface Description
Set human detection information
- (void)setPedestrianDetectConfig:(IvyPedestrianDetect *)config onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
config | DevMotionDetect object |
resultBlock | result |
Sample code
[self.ivyCamera getPedestrianDetectConfig:^(IvyPedestrianDetect * _Nonnull config, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, config:%@", @(cmdResult), config);
if (cmdResult != IVYIO_RESULT_OK) { return; }
config.isEnable = !config.isEnable;
[self.ivyCamera setPedestrianDetectConfig:config onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
}];
Get human detection device information
Interface Description
Obtain human detection equipment information
- (void)getPedestrianLicenseDeviceInfo:(void(^)(NSString *info, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getPedestrianLicenseDeviceInfo:^(NSString * _Nonnull info, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), info);
}];
Set Human Detection License
Interface Description
Set Human Detection License
- (void)setPedestrianLicense:(NSString *)license onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
license | license |
resultBlock | result |
Sample code
NSString * license = @ "bc7eb17155e92568a68e824ae4d6db8404f3d5f83c10acd3a81a055fdfdaee0b6241a508e0dad8ac9e0ae693862313b081210481727592dbb39b42feb5b205552343e1809445bbd7b842f44f2063254c73468a73d23da92519b036bbcb71b82a0af7b77079bacc80f008d2542b7e15e943374b37a3d4ede533d1a67ff90b8b59ab389f55826d83903402ac438ac4bbf72a89dc5a24c079f70ea90a0d0e95a11d6fe8e7ffbe1a0d4b7a985747daa7505826566b1cd48c0423d402ecb2bd2fc4d00384fb7ab89264bae8161e387d206ca0ace504fadcdd013a34dd4a15b0bcdf11539320c27fe8b05b09e33ab4aa86d598f875eae4b4d17452769d37f9e7e0c37f";
[self.ivyCamera setPedestrianLicense:license onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get sound detection
Interface Description
get sound detection
- (void)getAudioDetectConfig:(void(^)(IvyAudioDetect *config, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getAudioDetectConfig:^(IvyAudioDetect * _Nonnull config, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, config:%@", @(cmdResult), config);
if (cmdResult != IVYIO_RESULT_OK) { return; }
config.isEnable = !config.isEnable;
[self.ivyCamera setAudioDetectConfig:config onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
}];
Set sound detection
Interface Description
Set up sound detection
- (void)setAudioDetectConfig:(IvyAudioDetect *)config onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
config | DevMotionDetect object |
resultBlock | result |
Sample code
[self.ivyCamera getAudioDetectConfig:^(IvyAudioDetect * _Nonnull config, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, config:%@", @(cmdResult), config);
if (cmdResult != IVYIO_RESULT_OK) { return; }
config.isEnable = !config.isEnable;
[self.ivyCamera setAudioDetectConfig:config onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
}];
Network settings
Get device Wi-Fi configuration
Interface Description
Get device Wi-Fi configuration
- (void)getWiFiConfig:(void(^)(IvyWiFiConfig *config, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getWiFiConfig:^(IvyWiFiConfig * _Nonnull config, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), config.ssid);
}];
Output:
...cmdResult:0, obj:My_WiFi
Get Wi-Fi List
Interface Description
Get Wi-Fi List
- (void)getWiFiList:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getWiFiList:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"... getWiFiList cmdResult:%@ obj:%@", @(cmdResult), obj);
}];
Setting up Wi-Fi
Interface Description
Set up Wi-Fi
- (void)setWiFiConfig:(IvyWiFiDetail *)model password:(NSString *)password onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
model | Selected Wi-Fi type |
password | Wi-Fi password |
resultBlock | result |
Sample code
IvyWiFiDetail *obj = list[0];
NSString *password = @"1234567890";
[self.ivyCamera setWiFiConfig:obj password:password onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get network adaptive switch status
Interface Description
Get network adaptive switch status
- (void)getNetworkAutoAdaptability:(void(^)(NSInteger mode, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
mode: 0 off, 1 on
Sample code
[self.ivyCamera getNetworkAutoAdaptability:^(NSInteger mode, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, mode:%@", @(cmdResult), @(mode));
}];
Set network adaptive switch state
Interface Description
Set the network adaptive switch state
- (void)setNetworkAutoAdaptability:(NSInteger)mode onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
mode | state |
resultBlock | result |
Sample code
NSInteger mode = 1;
[self.ivyCamera setNetworkAutoAdaptability:mode onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
time setting
Get device system time
Interface Description
Get device system time
- (void)getSystemTime:(void(^)(IvyDevTime *devTime, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getSystemTime:^(IvyDevTime * _Nonnull devTime, IVYIO_RESULT cmdResult) {
if (cmdResult == IVYIO_RESULT_OK) {
NSLog(@"... devTime:%04ld-%02ld-%02ld %02ld:%02ld:%02ld", devTime.year, devTime.month, devTime.day, devTime.hour, devTime.min, devTime.sec );
}
}];
Output:
... devTime:2019-07-06 04:32:38
Set system time
Interface Description
set system time
- (void)setSystemTime:(IvyDevTime *)devTime onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
devTime | Time object |
resultBlock | result |
Sample code
devTime.hour = 12;
devTime.min = 30;
[self.ivyCamera setSystemTime:devTime onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Sync phone time to device
Interface Description
Sync phone time to device
- (void)syncSystemTime:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera syncSystemTime:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...syncSystemTime cmdResult:%@", @(cmdResult));
}];
SD card related
Get device SD card information
Interface Description
Get device SD card information
- (void)getSDCardInfo:(void(^)(IvySDInfo *ivySDInfo, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getSDCardInfo:^(IvySDInfo * _Nonnull ivySDInfo, IVYIO_RESULT cmdResult) {
if (cmdResult == IVYIO_RESULT_OK) {
NSLog(@"... isExist:%@ totalSpace:%@ freeSpace:%@", @(ivySDInfo.isExist), @(ivySDInfo.totalSpace), @(ivySDInfo.freeSpace));
}
}];
Format SD card
Interface Description
Format SD card
- (void)setSDCardFormat:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera setSDCardFormat:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get SD card recording list
Interface Description
Get SD card recording list
- (void)getSDCardRecordList:(NSUInteger)startTime endTime:(NSUInteger)endTime recordType:(NSInteger)recordType onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
startTime | start time |
endTime | End time |
recordType | Record Type |
resultBlock | result |
instruction
A query time cannot exceed one day
Sample code
NSInteger year, month, day;
NSInteger recordType = 2;
{
NSDate *date = [NSDate date];
NSCalendar *calendar = [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
calendar.timeZone = [NSTimeZone timeZoneWithName:@"UTC"];
NSDateComponents *components = [calendar components:NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay fromDate:date];
year = components.year;
month = components.month;
day = components.day;
}
NSLog(@"... getRecordList:%@-%@-%@ recordType:%@", @(year), @(month), @(day), @(recordType));
NSDateComponents *components = [[NSDateComponents alloc] init];
components.year = year;
components.month = month;
components.day = day;
components.minute = 0;
components.second = 0;
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDate *date = [calendar dateFromComponents:components];
NSUInteger st = (unsigned int)[date timeIntervalSince1970];
NSUInteger et = st + 24 * 3600 - 1;
__weak typeof(self) weakSelf = self;
[self.ivyCamera getSDCardRecordList:st endTime:et recordType:recordType onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
if (IVYIO_RESULT_OK == cmdResult) {
NSArray *records = (NSArray *)obj;
NSLog(@"... getRecordList records count:%@", @([records count]));
weakSelf.records = records;
[weakSelf reload];
} else {
NSLog(@"... getRecordList cmdResult:%@", @(cmdResult));
}
}];
Paging to get the SD card recording list
Interface Description
Paging to get the SD card recording list
- (void)getSDCardRecordList:(NSUInteger)startTime endTime:(NSUInteger)endTime recordType:(NSInteger)recordType startNo:(NSInteger)startNo onCompletion:(void(^)(IvyRecordList *recordList, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
startTime | Start time |
endTime | End time |
recordType | record Type |
startNo | Start number |
resultBlock | result |
instruction
The query time cannot exceed one day. startNo starts at 0.
Sample code
int startNo = 220;
[self.ivyCamera getSDCardRecordList:st endTime:et recordType:recordType startNo:startNo onCompletion:^(IvyRecordList * _Nonnull recordList, IVYIO_RESULT cmdResult) {
NSLog(@"... totalCnt:%@ startNo:%@", @(recordList.totalCnt), @(recordList.startNo));
if (IVYIO_RESULT_OK == cmdResult) {
NSArray *records = (NSArray *)recordList.list;
NSLog(@"... getRecordList records count:%@", @([records count]));
weakSelf.records = records;
[weakSelf reload];
} else {
NSLog(@"... getRecordList cmdResult:%@", @(cmdResult));
}
}];
Get SD card picture list
Interface Description
Get SD card picture list
- (void)getSDCardPictureList:(unsigned long long)startTime endTime:(unsigned long long)endTime type:(NSInteger)type startNo:(NSInteger)startNo onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
startTime | start time |
endTime | End time |
type | Image type |
startNo | start position |
resultBlock | result |
instruction
type 1 means manual recording, 2 means planned recording, 4 means motion detection, 8 means sound detection, 16 means IO detection, 32 means temperature detection, 64 means humidity detection, 128 means pedestrian detection, 256 means a key alert
Sample code
- (void)loadSDCardPictureList {
unsigned long long startTime = _st;
unsigned long long endTime = _et;
NSInteger type = 0xFFFF;
NSInteger startNo = _curCount;
[self.ivyCamera getSDCardPictureList:startTime endTime:endTime type:type startNo:startNo onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
if (cmdResult == IVYIO_RESULT_OK) {
IvyPictureList *list = (IvyPictureList *)obj;
NSLog(@"... totalCount:%@ curCount:%@", @(list.totalCount), @(list.curCount));
self.totalCount = list.totalCount;
self.curCount += list.curCount;
[self.dataSource addObjectsFromArray:list.list];
[self reload];
}
}];
}
Download SD card image
Interface Description
Download SD card image
- (void)downloadSDCardPicture:(IvyPictureInfo *)info onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
info | IvyPictureInfo object |
resultBlock | result |
instruction
If the image is downloaded successfully, it will be returned as NSData
Sample code
- (void)downloadPicture:(IvyPictureInfo *)info {
NSString *deviceUID = self.ivyCamera.deviceUID;
NSString *filename = [NSString stringWithFormat:@"%@_%@.JPG", deviceUID, @(info.time)];
NSString *filepath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:filename];
NSLog(@"... download picture time:%@", @(info.time));
[self.ivyCamera downloadSDCardPicture:info onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"... download picture time:%@ finished cmdResult:%@", @(info.time), @(cmdResult));
if (IVYIO_RESULT_OK == cmdResult) {
NSData *data = (NSData *)obj;
if (nil != data) {
BOOL flag = [data writeToFile:filepath atomically:YES];
if (flag) {
NSLog(@"...download picture success");
}
}
}
}];
}
Get scheduled recording configuration
Interface Description
Get Scheduled Recording Configuration
- (void)getScheduleRecordConfig:(void(^)(IvyScheduleRecordConfig *config, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera getScheduleRecordConfig:^(IvyScheduleRecordConfig * _Nonnull config, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), config);
}];
Set scheduled recording configuration
Interface Description
Set Scheduled Recording Configuration
- (void)setScheduleRecordConfig:(IvyScheduleRecordConfig *)config onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
config | IvyScheduleRecordConfig object |
resultBlock | result |
Sample code
config.isEnable = YES;
config.schedule0 = 281474976710655L;
[self.ivyCamera setScheduleRecordConfig:config onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), config);
}];
Other controls
Start recording
Interface Description
start recording
- (void)startRecord:(NSString *)filepath onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
filepath | file storage path |
resultBlock | result |
Sample code
NSString *filepath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:@"record.mp4"];
[self.ivyCamera startRecord:filepath onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"... startRecord cmdResult:%@", @(cmdResult));
}];
stop recording
Interface Description
stop recording
- (void)stopRecord:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera stopRecord:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"... stopRecord cmdResult:%@", @(cmdResult));
}];
Get camera volume
Interface Description
Get camera volume
- (void)getAudioVolume:(void(^)(NSInteger volume, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
The value range of volume is 0~100
Sample code
[self.ivyCamera getAudioVolume:^(NSInteger volume, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, volume:%@", @(cmdResult), @(volume));
[self.ivyCamera setAudioVolume:80 onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
}];
Set camera volume
Interface Description
Set the camera volume
- (void)setAudioVolume:(NSInteger)volume onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
volume | volume size |
resultBlock | result |
Sample code
[self.ivyCamera getAudioVolume:^(NSInteger volume, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, volume:%@", @(cmdResult), @(volume));
[self.ivyCamera setAudioVolume:80 onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
}];
Get the intercom volume
Interface Description
Get the intercom volume
- (void)getSpeakerVolume:(void(^)(NSInteger volume, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
The value range of volume is 0~100
Sample code
Set the intercom volume
Interface Description
Set the talkback volume
- (void)setSpeakerVolume:(NSInteger)volume onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
volume | volume size |
resultBlock | result |
Sample code
reboot device
Interface Description
reboot device
- (void)rebootSystem:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera rebootSystem:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get power frequency
Interface Description
get power frequency
- (void)getFrequency:(void(^)(NSInteger mode, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
mode: 0 means 50HZ, 1 means 60HZ, 2 means outdoor mode
Sample code
[self.ivyCamera getFrequency:^(NSInteger mode, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, mode:%@", @(cmdResult), @(mode));
}];
Set the power frequency
Interface Description
Set the power frequency
- (void)setFrequency:(NSInteger)mode onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
mode | IPC power frequency |
resultBlock | result |
Sample code
[self.ivyCamera setFrequency:0 onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, mode:%@", @(cmdResult), @(mode));
}];
Get sleep state
Interface Description
get sleep state
- (void)getCameraSleepState:(void(^)(NSInteger mode, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
mode: 0 not enabled, 1 sleep state, 2 wake state, 3 end sleep
Sample code
[self.ivyCamera getCameraSleepState:^(NSInteger mode, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, mode:%@", @(cmdResult), @(mode));
}];
Wake up the device
Interface Description
wake up the device
- (void)setCameraWakeUp:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera setCameraWakeUp:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Hibernate the device
Interface Description
hibernate device
- (void)setCameraSleep:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
Sample code
[self.ivyCamera setCameraSleep:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get indicator switch status
Interface Description
Get light switch status
- (void)getLedEnableState:(void(^)(NSInteger mode, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
mode: 0 off, 1 on
Sample code
[self.ivyCamera getLedEnableState:^(NSInteger mode, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, mode:%@", @(cmdResult), @(mode));
}];
Set indicator switch status
Interface Description
Set the light switch state
- (void)setLedEnableState:(NSInteger)mode onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
mode | state |
resultBlock | result |
Sample code
[self.ivyCamera setLedEnableState:1 onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Get prompt voice switch status
Interface Description
Get the prompt voice switch status
- (void)getVoiceState:(void(^)(NSInteger mode, IVYIO_RESULT cmdResult))resultBlock;
Parameter Description
Parameters | Description |
---|---|
resultBlock | result |
instruction
mode: 0 off, 1 on
Sample code
[self.ivyCamera getVoiceState:^(NSInteger mode, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, mode:%@", @(cmdResult), @(mode));
}];
Set prompt voice switch state
Interface Description
Set the prompt voice switch state
- (void)setVoiceState:(NSInteger)mode onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
mode | state |
resultBlock | result |
Sample code
[self.ivyCamera setVoiceState:1 onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Cloud configuration
Online upgrade
Interface Description
Online upgrade
- (void)setOnlineUpgrade:(NSString *)URLString onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
URLString | Upgrade link |
resultBlock | result |
Sample code
NSString *URLString = @"http://test-download.myfoscam.com:9001/firmware/test/anba_F_app_ver2.x.1.77_0821--1569550740170.bin";
[self.ivyCamera setOnlineUpgrade:URLString onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Set cloud storage configuration
Interface Description
Set up cloud storage configuration
- (void)setCloudStorageConfig:(NSString *)portal deviceMac:(NSString *)deviceMac streamId:(NSString *)streamId userTag:(NSString *)userTag onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
portal | Gateway address |
deviceMac | deviceMac |
streamId | Authorized cloud storage ID |
userTag | Authorized user tag |
resultBlock | result |
Sample code
NSString *portal = @"https://test-api.myfoscam.com:443";
NSString *deviceMac = @"00000000232A";
NSString *streamId = @"1a8d226eca789c189403c112b6c1acb5104256400000000232A";
NSString *userTag = @"d85280b8e9e146679197c2dca2f54531";
[self.ivyCamera setCloudStorageConfig:portal deviceMac:deviceMac streamId:streamId userTag:userTag onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Set rich media push configuration
Interface Description
Set rich media push configuration
- (void)setRichMediaPushConfig:(NSString *)portal userTag:(NSString *)userTag onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
portal | Gateway address |
userTag | Authorized user tag |
resultBlock | result |
Sample code
NSString *portal = @"https://test-api.myfoscam.com";
NSString *userTag = @"a44ad70c97f84d21b763412119f3397e";
[self.ivyCamera setRichMediaPushConfig:portal userTag:userTag onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Set text push configuration
Interface Description
Set text push configuration
- (void)setTextPushConfig:(NSString *)portal userTag:(NSString *)userTag onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
portal | Gateway address |
userTag | Authorized user tag |
resultBlock | result |
Sample code
NSString *portal = @"https://test-api.myfoscam.com";
NSString *userTag = @"a44ad70c97f84d21b763412119f3397e";
[self.ivyCamera setTextPushConfig:portal userTag:userTag onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
General commands
Common commands
Interface Description
General command
- (void)sendCommand:(int)cgiCommand parameters:(NSDictionary *)parameters iTimeout:(int)iTimeout onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
cgiCommand | Command |
parameters | input parameters |
iTimeout | Timeout duration |
resultBlock | result |
Sample code
[self.ivyCamera sendCommand:IVY_CTRL_MSG_GET_OSD_PARAM parameters:@{} iTimeout:kTimeout onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
NSInteger osdType = 0b001;
NSDictionary *parameters = @{@"dispPos" : @(0),
@"osdType" : @(osdType)};
[self.ivyCamera sendCommand:IVY_CTRL_MSG_SET_OSD_PARAM parameters:parameters iTimeout:kTimeout onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
General command, send CGI command
Interface Description
General command, send CGI command
- (void)sendCGICommand:(NSString *)cgiCommand iTimeout:(int)iTimeout onCompletion:(IvyCameraResultBlock)resultBlock;
Parameter Description
Parameters | Description |
---|---|
cgiCommand | Command string |
iTimeout | Timeout duration |
resultBlock | result |
Sample code
NSString *deviceName = @"Küche";
NSString *value = [deviceName UTF8ToUnicode];
NSString *cmd = [NSString stringWithFormat:@"cmd=setDevNameUnicode&devNameUnicode=%@", value];
[self.ivyCamera sendCGICommand:cmd iTimeout:30000 onCompletion:^(id _Nullable obj, IVYIO_RESULT cmdResult) {
NSLog(@"...cmdResult:%@, obj:%@", @(cmdResult), obj);
}];
Event Management
Add an event observer
Interface Description
Add an event observer
- (void)addEventObserver:(id)observer selector:(SEL)aSelector;
Parameter Description
Parameters | Description |
---|---|
observer | observer |
aSelector | selector |
instruction
must call removeEventObserver: remove the current observer
Sample code
[self.ivyCamera addEventObserver:self selector:@selector(handleEvent:)];
- (void)handleEvent:(NSDictionary *)eventDict {
NSInteger eventId = [eventDict[@"eventId"] integerValue];
NSLog(@"... eventId:%@ eventDict:%@", @(eventId), eventDict);
switch(eventId) {
case IVY_CTRL_MSG_DAY_NIGHT_MODE_CHG: {
}
break;
case IVY_CTRL_MSG_MIRROR_FLIP_CHG: {
}
break;
case IVY_CTRL_MSG_ONLINE_UPGRADE_STATE: {
NSLog(@"... IVY_CTRL_MSG_ONLINE_UPGRADE_STATE eventDict:%@", eventDict);
}
default:
break;
}
}
remove an observer
Interface Description
remove an observer
- (void)removeEventObserver:(id)observer;
Parameter Description
Parameters | Description |
---|---|
observer | observer |
Sample code
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.ivyCamera removeEventObserver:self];
}
IvyPlayer Live Streaming
IvyPlayer Live Streaming Class
live streaming
Interface Description
live streaming
- (void)playLive:(IvyCamera *)ivyCamera decodeType:(IvyVideoDecodeType)decodeType;
Parameter Description
Parameters | Description |
---|---|
ivyCamera | Equipment |
decodeType | Type of decoded data |
Sample code
- (void)play {
__weak typeof(self) weakSelf = self;
[self.ivyCamera loginCamera:^(IVYIO_HANDLE_STATE handleState, IVYIO_RESULT cmdResult) {
if (IVYIO_HANDLE_STATE_ONLINE == handleState) {
[weakSelf.ivyPlayer playLive:self.ivyCamera decodeType:IvyVideoDecodeUIImage];
} else {
NSLog(@"...Offline");
}
}];
}
- (IvyPlayer *)ivyPlayer {
if (!_ivyPlayer) {
_ivyPlayer = [IvyPlayer new];
_ivyPlayer.delegate = self;
}
return _ivyPlayer;
}
Stop play
Interface Description
Stop play
- (void)stop;
Sample code
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.ivyPlayer endTalk];
[self.ivyPlayer stop];
}
Open Intercom
Interface Description
open intercom
- (void)startTalk;
Sample code
[self.ivyPlayer startTalk];
close intercom
Interface Description
Turn off the intercom
- (void)endTalk;
Sample code
[self.ivyPlayer endTalk];
Audio switch
Property description
audio switch
@property (nonatomic, assign) BOOL validAudio;
Sample code
self.ivyPlayer.validAudio = NO;
acting
Property description
acting
@property (nonatomic, weak) id<IvyPlayerDelegate > delegate;
IvyPlayerDelegate Live Streaming Agent
decoded to a frame of UIImage image
Interface Description
Image decoded to a frame of UIImage
- (void)ivyPlayer:(IvyPlayer *)ivyPlayer didReciveFrame:(UIImage *)image isFirstFrame:(BOOL)isFirstFrame;
Parameter Description
Parameters | Description |
---|---|
ivyPlayer | Current player |
image | A frame of image |
isFirstFrame | Is it the first frame of data |
instruction
When the IvyVideoDecodeUIImage type is used for playback, the frame data is returned through this method. Otherwise, return the specified frame data through ivyPlayer:didReciveIVYFrame:isFirstFrame.
Sample code
- (void)ivyPlayer:(IvyPlayer *)ivyPlayer didReciveFrame:(UIImage *)image isFirstFrame:(BOOL)isFirstFrame {
self.imageView.image = image;
if (isFirstFrame) {
}
}
Decode to a frame of an image of the specified format
Interface Description
Decode to a frame of an image of the specified format
- (void)ivyPlayer:(IvyPlayer *)ivyPlayer didReciveIVYFrame:(IVYIO_FRAME *)frame isFirstFrame:(BOOL)isFirstFrame;
Parameter Description
Parameters | Description |
---|---|
ivyPlayer | Current player |
frame | Specify frame data |
isFirstFrame | Is it the first frame of data |
Sample code
- (void)ivyPlayer:(IvyPlayer *)ivyPlayer didReciveIVYFrame:(IVYIO_FRAME *)frame isFirstFrame:(BOOL)isFirstFrame {
NSLog(@"...isKey:%@ len:%@", @(frame->iKey), @(frame->len));
}
Command result
Interface Description
command result
- (void)ivyPlayer:(IvyPlayer *)ivyPlayer playerCommand:(IvyPlayerCommand)command result:(IVYIO_RESULT)result;
Parameter Description
Parameters | Description |
---|---|
ivyPlayer | Current player |
command | command |
result | result |
Sample code
- (void)ivyPlayer:(IvyPlayer *)ivyPlayer playerCommand:(IvyPlayerCommand)command result:(IVYIO_RESULT)result {
NSLog(@"... command:%@ result:%@", @(command), @(result));
}
Play traffic
Interface Description
Play traffic
- (void)ivyPlayer:(IvyPlayer *)ivyPlayer mediaTransmitSpeed:(NSUInteger)transmitSpeed;
Parameter Description
Parameters | Description |
---|---|
ivyPlayer | Current player |
transmitSpeed | Traffic size (Kb) |
Sample code
- (void)ivyPlayer:(IvyPlayer *)ivyPlayer mediaTransmitSpeed:(NSUInteger)transmitSpeed {
NSString *text = nil;
CGFloat mb = transmitSpeed / (1024.f * 1024.f);
if (mb > 1) {
text = [NSString stringWithFormat:@"%4.1fMB", mb];
} else {
CGFloat kb = transmitSpeed / 1024.f;
text = [NSString stringWithFormat:@"%4.1fKB",kb];
}
NSLog(@"... transmitSpeed:%@", text);
}
IvySDPlayer SD card playback
IvySDPlayer SD card playback class
Play SD card video
Interface Description
Play SD card video
- (void)playBack:(IvyCamera *)ivyCamera recordObject:(id<IvyRecordObject>)recordObject decodeType:(IvyVideoDecodeType)decodeType;
Parameter Description
Parameters | Description |
---|---|
ivyCamera | Device Object |
recordObject | Recording object |
decodeType | Type of decoded data |
Sample code
- (void)playBack:(id<IvyRecordObject>)obj {
if (nil == obj) { return; }
[self.player playBack:self.ivyCamera recordObject:obj decodeType:IvyVideoDecodeUIImage];
self.player.validAudio = YES;
}
- (IvySDPlayer *)player {
if (!_player) {
_player = [IvySDPlayer new];
_player.delegate = self;
}
return _player;
}
Pause playback
Interface Description
Pause playback
- (void)pause;
Sample code
continue playing
Interface Description
resume playing
- (void)resume;
Sample code
Set playback position
Interface Description
Set playback position
- (void)seekToPosition:(NSTimeInterval)pos;
Parameter Description
Parameters | Description |
---|---|
pos | Play position |
Sample code
NSTimeInterval pos = 10;
[self.player seekToPosition:pos];
Stop play
Interface Description
Stop play
- (void)stop;
Sample code
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.player stop];
}
Audio switch
Property description
audio switch
@property (nonatomic, assign) BOOL validAudio;
Sample code
self.player.validAudio = NO;
acting
Property description
acting
@property (nonatomic, weak) id<IvySDPlayerDelegate> delegate;
IvySDPlayerDelegate SD card playback agent
decoded to a frame of UIImage image
Interface Description
Image decoded to a frame of UIImage
- (void)ivySDPlayer:(IvySDPlayer *)player didReciveFrame:(UIImage *)image isFirstFrame:(BOOL)isFirstFrame;
Parameter Description
Parameters | Description |
---|---|
player | Current player |
image | A frame of image |
isFirstFrame | Is it the first frame of data |
instruction
When the IvyVideoDecodeUIImage type is used for playback, the frame data is returned through this method. Otherwise, return the specified frame data through ivySDPlayer:didReciveIVYFrame:isFirstFrame.
Sample code
- (void)ivySDPlayer:(IvySDPlayer *)player didReciveFrame:(UIImage *)image isFirstFrame:(BOOL)isFirstFrame {
self.imageView.image = image;
if (isFirstFrame) {
}
}
Decode to a frame of an image of the specified format
Interface Description
Decode to a frame of an image of the specified format
- (void)ivySDPlayer:(IvySDPlayer *)player didReciveIVYFrame:(IVYIO_FRAME *)frame isFirstFrame:(BOOL)isFirstFrame;
Parameter Description
Parameters | Description |
---|---|
player | Current player |
frame | Specify frame data |
isFirstFrame | Is it the first frame of data |
Sample code
Command result
Interface Description
command result
- (void)ivySDPlayer:(IvySDPlayer *)player playerCommand:(IvyPlayerCommand)command result:(IVYIO_RESULT)result;
Parameter Description
Parameters | Description |
---|---|
player | Current player |
command | command |
result | result |
Sample code
- (void)ivySDPlayer:(IvySDPlayer *)player playerCommand:(IvyPlayerCommand)command result:(IVYIO_RESULT)result {
NSLog(@"... command:%@ result:%@", @(command), @(result));
switch (command) {
case IvyPlayerOpenVideo: {
if (result != IVYIO_RESULT_OK) {
_isFinished = YES;
}
}
break;
case IvyPlayerCloseVideo: {
_isFinished = YES;
}
break;
case IvyPlayerFinished: {
self.imageView.image = nil;
[self autoPlay];
}
break;
default:
break;
}
}
play time
Interface Description
play time
- (void)ivySDPlayer:(IvySDPlayer *)player totalTime:(NSTimeInterval)totalTime timePosition:(NSTimeInterval)timePosition;
Parameter Description
Parameters | Description |
---|---|
player | Current player |
totalTime | The total duration of this video |
timePosition | Current playback position |
Sample code
- (void)ivySDPlayer:(IvySDPlayer *)player totalTime:(NSTimeInterval)totalTime timePosition:(NSTimeInterval)timePosition {
NSLog(@"... totalTime:%@ timePosition:%@", @(totalTime), @(timePosition));
}
Buffering progress
Interface Description
buffer progress
- (void)ivySDPlayer:(IvySDPlayer *)player bufferingProgress:(CGFloat)progress;
Parameter Description
Parameters | Description |
---|---|
player | Current player |
progress | Buffering progress |
Sample code
- (void)ivySDPlayer:(IvySDPlayer *)player bufferingProgress:(CGFloat)progress {
NSLog(@"... buffering progress:%@", @(progress));
}
Play traffic
Interface Description
Play traffic
- (void)ivySDPlayer:(IvySDPlayer *)player mediaTransmitSpeed:(NSUInteger)transmitSpeed;
Parameter Description
Parameters | Description |
---|---|
player | Current player |
transmitSpeed | Traffic size (Kb) |
Sample code
- (void)ivySDPlayer:(IvySDPlayer *)player mediaTransmitSpeed:(NSUInteger)transmitSpeed {
NSString *text = nil;
CGFloat mb = transmitSpeed / (1024.f * 1024.f);
if (mb > 1) {
text = [NSString stringWithFormat:@"%4.1fMB", mb];
} else {
CGFloat kb = transmitSpeed / 1024.f;
text = [NSString stringWithFormat:@"%4.1fKB",kb];
}
NSLog(@"... transmitSpeed:%@", text);
}
IvySDDownloader SD card video download
IvySDDownloader class
IvySDDownloader singleton
Interface Description
IvySDDownloader singleton
+ (IvySDDownloader *)shared;
Sample code
Download SD card video file
Interface Description
Download SD card video file
- (void)downloadSDCardRecod:(IvyCamera *)ivyCamera recordObject:(id<IvyRecordObject>)recordObject toURL:(NSURL *)location;
Parameter Description
Parameters | Description |
---|---|
ivyCamera | Device Object |
recordObject | SD card recording object to be downloaded |
location | SD card recording file storage path |
Sample code
- (void)downloadWithObject:(id<IvyRecordObject>)obj {
if ([IvySDDownloader shared].isDownloading) {
NSLog(@"...is downloading");
return;
}
NSURL *locationURL = nil;
switch(obj.type) {
case IvyRecordType0: {
IvyRecordObject0 *model = (IvyRecordObject0 *)obj;
NSString *locationStr = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.mp4", @(model.sTime)]];
locationURL = [NSURL URLWithString:locationStr];
}
break;
case IvyRecordType1: {
IvyRecordObject1 *model = (IvyRecordObject1 *)obj;
NSString *filepath = model.filepath;
NSString *filename = [NSString stringWithFormat:@"%@.mp4", [[filepath componentsSeparatedByString:@"/"].lastObject componentsSeparatedByString:@"."].firstObject];
NSString *locationStr = [NSTemporaryDirectory() stringByAppendingPathComponent:filename];
locationURL = [NSURL URLWithString:locationStr];
}
break;
}
NSLog(@"... locationURL:%@", locationURL.absoluteString);
[IvySDDownloader shared].delegate = self;
[[IvySDDownloader shared] downloadSDCardRecod:self.ivyCamera recordObject:obj toURL:locationURL];
}
Cancel current download
Interface Description
Cancel the current download
- (void)cancel;
Sample code
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if ([IvySDDownloader shared].isDownloading) {
[[IvySDDownloader shared] cancel];
}
[self.player stop];
}
acting
Property description
acting
@property (nonatomic, weak) id<IvySDDownloaderDelegate> delegate;
IvySDDownloaderDelegate delegate
SD card video download successfully
Interface Description
SD card video download successfully
- (void)ivySDDownloader:(IvySDDownloader *)downloader didFinishDownloadingToURL:(NSURL *)location;
Parameter Description
Parameters | Description |
---|---|
downloader | IvySDDownloader object |
location | SD card recording file storage path |
Sample code
#pragma mark - IvySDDownloaderDelegate
- (void)ivySDDownloader:(IvySDDownloader *)downloader didFinishDownloadingToURL:(NSURL *)location {
NSLog(@"... ivySDDownloader didFinishDownloadingToURL:%@", location.absoluteString);
}
- (void)ivySDDownloader:(IvySDDownloader *)downloader progress:(CGFloat)progress {
NSLog(@"... ivySDDownloader progress:%@", @(progress));
}
- (void)ivySDDownloader:(IvySDDownloader *)downloader didFinishDownloadingWithError:(IVYIO_RESULT)result {
NSLog(@"... ivySDDownloader didFinishDownloadingWithError:%@", @(result));
}
SD card video download progress
Interface Description
SD card video download progress
- (void)ivySDDownloader:(IvySDDownloader *)downloader progress:(CGFloat)progress;
Parameter Description
Parameters | Description |
---|---|
downloader | IvySDDownloader object |
progress | progress value |
instruction
progress range 0~1
Sample code
SD card video download failed
Interface Description
SD card video download failed
- (void)ivySDDownloader:(IvySDDownloader *)downloader didFinishDownloadingWithError:(IVYIO_RESULT)result;
Parameter Description
Parameters | Description |
---|---|
downloader | IvySDDownloader object |
result | Failure reason |
Sample code
IvyVoicePlayer Sonic Distribution Network
IvyVoicePlayer class
Initialization method
Interface Description
initialization method
- (instancetype)initWithSSID:(nonnull NSString *)SSID password:(nonnull NSString *)password deviceUID:(nullable NSString *)deviceUID;
Parameter Description
Parameters | Description |
---|---|
SSID | Wi-Fi SSID |
password | Wi-Fi password |
deviceUID | Device UID |
return
IvyVoicePlayer object
Sample code
NSString *SSID = kDeviceUID;
NSString *password = kWiFiPassword;
NSString *deviceUID = kDeviceUID;
_voicePlayer = [[IvyVoicePlayer alloc] initWithSSID:SSID password:password deviceUID:deviceUID];
_voicePlayer.delegate = self;
[_voicePlayer play];
Play
Interface Description
play
- (void)play;
Sample code
Stop play
Interface Description
Stop play
- (void)stop;
Sample code
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if (_voicePlayer) {
[_voicePlayer stop];
}
}
acting
Property description
acting
@property (nonatomic, weak) id<IvyVoicePlayerDelegate> delegate;
IvyVoicePlayerDelegate Delegate
Sonic distribution network completed
Interface Description
Sonic distribution network completed
- (void)ivyVoicePlayerDidFinishPlaying:(IvyVoicePlayer *)player successfully:(BOOL)flag;
Parameter Description
Parameters | Description |
---|---|
player | current object |
flag | result |
Sample code
#pragma mark - IvyVoicePlayerDelegate
- (void)ivyVoicePlayerDidFinishPlaying:(IvyVoicePlayer *)player successfully:(BOOL)flag {
NSLog(@"... did Finish Playing flag:%@", @(flag));
}
- (void)ivyVoicePlayerDecodeErrorDidOccur:(IvyVoicePlayer *)player error:(NSError * __nullable)error {
NSLog(@"... decodeErrorDidOccur:%@", error);
}
Sonic distribution network abnormal
Interface Description
Abnormal sonic distribution network
- (void)ivyVoicePlayerDecodeErrorDidOccur:(IvyVoicePlayer *)player error:(NSError * __nullable)error;
Parameter Description
Parameters | Description |
---|---|
player | current object |
error | exception |
Sample code
Ivy data model
IvyDevAbility Device Capability Set
property definitions
Property description
property definition
@property (nonatomic, assign) NSInteger val0;
@property (nonatomic, assign) NSInteger val1;
@property (nonatomic, assign) NSInteger val2;
@property (nonatomic, assign) NSInteger val3;
@property (nonatomic, assign) NSInteger val4;
@property (nonatomic, assign) NSInteger val5;
@property (nonatomic, assign) NSInteger val6;
@property (nonatomic, assign) NSInteger val7;
@property (nonatomic, assign) NSInteger val8;
IvyDevAbility (Helper) Device Ability Set Helper
Whether to support sd card
Property description
Whether to support sd card
@property (nonatomic, assign, readonly) BOOL enableSD;
Whether to support outdoor
Property description
Whether to support outdoor
@property (nonatomic, assign, readonly) BOOL enableOutdoor;
Whether to support pt
Property description
Whether to support pt
@property (nonatomic, assign, readonly) BOOL enablePT;
Whether to support zoom
Property description
Whether to support zoom
@property (nonatomic, assign, readonly) BOOL enableZoom;
Whether rs485 is supported
Property description
Whether rs485 is supported
@property (nonatomic, assign, readonly) BOOL enableRS485;
Whether ioAlarm is supported
Property description
Whether to support ioAlarm
@property (nonatomic, assign, readonly) BOOL enableIOAlarm;
Whether to support onvif
Property description
Whether to support onvif
@property (nonatomic, assign, readonly) BOOL enableOnvif;
Whether p2p is supported
Property description
Whether to support p2p
@property (nonatomic, assign, readonly) BOOL enableP2P;
####Whether wps is supported
Property description
Whether to support wps
@property (nonatomic, assign, readonly) BOOL enableWPS;
Whether to support monitoring (device prompt volume adjustment)
Property description
Whether to support monitoring (device prompt volume adjustment)
@property (nonatomic, assign, readonly) BOOL enableAudio;
Whether to support intercom
Property description
Whether to support intercom
@property (nonatomic, assign, readonly) BOOL enableTalk;
Whether to support full-duplex intercom
Property description
Whether to support full-duplex intercom
@property (nonatomic, assign, readonly) BOOL enableDuplexVoice;
Whether to support video parameter network adaptation
Property description
Whether to support video parameter network adaptation
@property (nonatomic, assign, readonly) BOOL enableNetworkAdapter;
Whether to support resolution switching and primary and secondary stream switching
Property description
Whether to support resolution switching and primary and secondary stream switching
@property (nonatomic, assign, readonly) BOOL enableStreamMode;
instruction
For NO: only support primary and secondary stream switching
Whether to support region selection
Property description
Whether to support region selection
@property (nonatomic, assign, readonly) BOOL enableMotionArea;
Whether to support one-key calling
Property description
Whether to support one-key calling
@property (nonatomic, assign, readonly) BOOL enableOneKeyCall;
Whether to support night vision plan
Property description
Whether to support night vision plan
@property (nonatomic, assign, readonly) BOOL enableNightVisionSchedule;
Whether to support SD card image download
Property description
Whether to support SD card image download
@property (nonatomic, assign, readonly) BOOL enableSDCardPictureDownload;
Whether to support dropbox cloud storage
Property description
Whether to support dropbox cloud storage
@property (nonatomic, assign, readonly) BOOL enableDropboxStorage;
instruction
NO means support for Baidu cloud storage (fosbaby domestic and foreign sales series only support Baidu cloud storage)
Whether to support Baidu push
Property description
Whether to support Baidu push
@property (nonatomic, assign, readonly) BOOL enableBaiduPush;
Whether to support Foscam push
Property description
Whether to support Foscam push
@property (nonatomic, assign, readonly) BOOL enableFoscamPush;
Whether to support Foscam storage
Property description
Whether to support Foscam storage
@property (nonatomic, assign, readonly) BOOL enableFoscamStorage;
Whether to support Foscam rich media push
Property description
Whether to support Foscam rich media push
@property (nonatomic, assign, readonly) BOOL enableFoscamRichPush;
Alexa support
Property description
Whether to support Alexa
@property (nonatomic, assign, readonly) BOOL enableAlexa;
Whether to support 7*24 hours cloud storage
Property description
Whether to support 7*24 hours cloud storage
@property (nonatomic, assign, readonly) BOOL enable24HStorage;
Whether to support alarm recording duration setting
Property description
Whether to support alarm recording duration setting
@property (nonatomic, assign, readonly) BOOL enableRecordTimeSet;
Whether to support APP preset cruise
Property description
Whether to support APP preset cruise
@property (nonatomic, assign, readonly) BOOL enablePresetCruise;
Whether to support out-of-frame detection
Property description
Whether to support out-of-frame detection
@property (nonatomic, assign, readonly) BOOL enableOutSideDetect;
Whether to support sound detection
Property description
Whether to support sound detection
@property (nonatomic, assign, readonly) BOOL enableAudioDetect;
Whether to support temperature detection
Property description
Whether to support temperature detection
@property (nonatomic, assign, readonly) BOOL enableTemperatureDetect;
Whether to support humidity detection
Property description
Whether to support humidity detection
@property (nonatomic, assign, readonly) BOOL enableHumidityDetect;
Whether to support PIR detection
Property description
Whether to support PIR detection
@property (nonatomic, assign, readonly) BOOL enablePIRDetect;
Whether to support IV detection
Property description
Whether to support IV detection
@property (nonatomic, assign, readonly) BOOL enableIVDetect;
Whether to support human body detection – Aihua Yingtong
Property description
Whether to support human body detection–Aihua Yingtong
@property (nonatomic, assign, readonly) BOOL enableHumanDetect_aiwinn;
Whether to support human detection – Shankou
Property description
Whether to support human detection–Shankou
@property (nonatomic, assign, readonly) BOOL enableHumanDetect_sanko;
Do you support nursery rhymes?
Property description
Do you support nursery rhymes?
@property (nonatomic, assign, readonly) BOOL enableBabyMusic;
Whether to support chip encryption
Property description
Whether to support chip encryption
@property (nonatomic, assign, readonly) BOOL enableChipEncrypt;
Whether SoftAP is supported
Property description
Whether to support SoftAP
@property (nonatomic, assign, readonly) BOOL enableSoftAP;
Whether to support EZLink
Property description
Whether to support EZLink
@property (nonatomic, assign, readonly) BOOL enableEZLink;
instruction
Does not distinguish between chips, does not indicate whether IPC scan code is supported
Whether to support PPPoE
Property description
Whether to support PPPoE
@property (nonatomic, assign, readonly) BOOL enablePPPoE;
Whether to support night vision infrared function
Property description
Whether to support night vision infrared function
@property (nonatomic, assign, readonly) BOOL enableNightIRCut;
Whether to support the recording function
Property description
Whether to support the recording function
@property (nonatomic, assign, readonly) BOOL enableRecord;
Whether to support scheduled restart
Property description
Whether to support scheduled restart
@property (nonatomic, assign, readonly) BOOL enableTimingReset;
Whether to support arm and disarm
Property description
Whether to support arm and disarm
@property (nonatomic, assign, readonly) BOOL enableDefend;
Whether to support indicator switch
Property description
Whether to support indicator switch
@property (nonatomic, assign, readonly) BOOL enableLEDLight;
Whether to support night light switch
Property description
Whether to support night light switch
@property (nonatomic, assign, readonly) BOOL enableNightLight;
Whether to support speaker volume control
Property description
Whether to support speaker volume control
@property (nonatomic, assign, readonly) BOOL enableVolume;
Whether to support HDR
Property description
Whether to support HDR
@property (nonatomic, assign, readonly) BOOL enableHDR;
####Whether WDR is supported
Property description
Whether to support WDR
@property (nonatomic, assign, readonly) BOOL enableWDR;
Whether to support voice prompt switch
Property description
Whether to support voice prompt switch
@property (nonatomic, assign, readonly) BOOL enableVoiceTips;
Whether to support Shenma full-duplex algorithm
Property description
Whether to support Whatsminer full-duplex algorithm
@property (nonatomic, assign, readonly) BOOL enableShenMaDuplexVoice;
Whether to support dual motor auto focus
Property description
Whether to support dual motor auto focus
@property (nonatomic, assign, readonly) BOOL enable2MotorsAutoFocus;
Whether to support the PTZ cruise guard position
Property description
Whether to support the PTZ cruise guard position
@property (nonatomic, assign, readonly) BOOL enablePTCruise;
Whether to support device name Unicode
Property description
Whether to support device name Unicode
@property (nonatomic, assign, readonly) BOOL enableUnicodeDevName;
Whether to support device sleep
Property description
Whether to support device sleep
@property (nonatomic, assign, readonly) BOOL enableSleep;
IvyDevInfo Device Information
Equipment type
Property description
Equipment type
@property (nonatomic, assign) NSInteger devType;
Platform type
Property description
Platform type
@property (nonatomic, assign) NSInteger platType;
sensor type
Property description
sensor type
@property (nonatomic, assign) NSInteger sensorType;
wifi type
Property description
wifi type
@property (nonatomic, assign) NSInteger wifiType;
language
Property description
language
@property (nonatomic, assign) NSInteger language;
product name
Property description
product name
@property (nonatomic, strong) NSString *productName;
Equipment name
Property description
Equipment name
@property (nonatomic, strong) NSString *devName;
Application firmware version number
Property description
Application firmware version number
@property (nonatomic, strong) NSString *firmwareVersion;
System firmware version number
Property description
System firmware version number
@property (nonatomic, strong) NSString *hardwareVersion;
serial number
Property description
serial number
@property (nonatomic, strong) NSString *serialNo;
Device UID
Property description
Device UID
@property (nonatomic, strong) NSString *uid;
MAC address
Property description
MAC address
@property (nonatomic, strong) NSString *mac;
OEM code
Property description
OEM code
@property (nonatomic, assign) NSInteger oemCode;
IvyDevLan LAN Search
Mac address
Property description
Mac address
@property (nonatomic, strong) NSString *mac;
Equipment name
Property description
Equipment name
@property (nonatomic, strong) NSString *name;
IP address
Property description
IP address
@property (nonatomic, strong) NSString *ip;
####mask
Property description
mask
@property (nonatomic, assign) NSInteger mask;
NDS
Property description
NDS
@property (nonatomic, assign) NSInteger dns;
Type 0: FOSIPC_H264 1: FOSIPC_MJ 2: FOSIPC_UNKNOW
Property description
Type 0: FOSIPC_H264 1: FOSIPC_MJ 2: FOSIPC_UNKNOW
@property (nonatomic, assign) NSInteger type;
port
Property description
port
@property (nonatomic, assign) NSInteger port;
DHCP is enabled
Property description
Whether DHCP is enabled
@property (nonatomic, assign) NSInteger dhcp_enabled;
Device UID
Property description
Device UID
@property (nonatomic, strong) NSString *uid;
IvyMotionDetect motion detection alarm protocol
Motion detection alarm type
Property description
Motion detection alarm type
@property (nonatomic, assign, readonly) IvyMotionDetectType type;
IvyMotionDetectObject0 Motion detection alarm model 1
switch
Property description
switch
@property (nonatomic, assign) NSInteger isEnable;
instruction
0: Off 1: On
Motion detection switch
Property description
Motion detection switch
@property (nonatomic, assign) NSInteger isMovAlarmEnable;
instruction
0: Off 1: On
PIR detection switch
Property description
PIR detection switch
@property (nonatomic, assign) NSInteger isPirAlarmEnable;
instruction
0: Off 1: On
linkage
Property description
linkage
@property (nonatomic, assign) NSInteger linkage;
instruction
Bit0: Ring Bit1: Send email Bit2: Screenshot Bit3: Video Bit4: Io output Bit5: Screenshot to cloud Bit6: Video to cloud Bit7: Mobile push
Capture interval seconds
Property description
Capture interval seconds
@property (nonatomic, assign) NSInteger snapInterval;
Sensitivity
Property description
sensitivity
@property (nonatomic, assign) NSInteger sensitivity;
trigger interval
Property description
Trigger interval
@property (nonatomic, assign) NSInteger triggerInterval;
Sunday
Property description
Sunday
@property (nonatomic, assign) long long schedule0;
instruction
bit0-bit47 represents one day, each bit represents half an hour
281474976710655: Indicates all day
246290738806799: Indicates 00:00 to 02:00, 07:30 to 13:30, 22:30 to 24:00
on Monday
Property description
on Monday
@property (nonatomic, assign) long long schedule1;
Tuesday
Property description
Tuesday
@property (nonatomic, assign) long long schedule2;
Wednesday
Property description
Wednesday
@property (nonatomic, assign) long long schedule3;
Thursday
Property description
Thursday
@property (nonatomic, assign) long long schedule4;
Friday
Property description
Friday
@property (nonatomic, assign) long long schedule5;
Saturday
Property description
Saturday
@property (nonatomic, assign) long long schedule6;
Detection alarm area
Property description
Detection alarm area
@property (nonatomic, assign) NSInteger areas0;
@property (nonatomic, assign) NSInteger areas1;
@property (nonatomic, assign) NSInteger areas2;
@property (nonatomic, assign) NSInteger areas3;
@property (nonatomic, assign) NSInteger areas4;
@property (nonatomic, assign) NSInteger areas5;
@property (nonatomic, assign) NSInteger areas6;
@property (nonatomic, assign) NSInteger areas7;
@property (nonatomic, assign) NSInteger areas8;
@property (nonatomic, assign) NSInteger areas9;
instruction
The detection and alarm area is divided into 10 * 10 small areas, each area represents 10 areas of a certain line on the screen, a total of 10 areas, the areas are represented by bits, and the value range is 0~1023
IvyMotionDetectObject1 Motion detection alarm model 2
switch
Property description
switch
@property (nonatomic, assign) NSInteger isEnable;
instruction
0: Off 1: On
Motion detection switch
Property description
Motion detection switch
@property (nonatomic, assign) NSInteger isMovAlarmEnable;
instruction
0: Off 1: On
PIR detection switch
Property description
PIR detection switch
@property (nonatomic, assign) NSInteger isPirAlarmEnable;
instruction
0: Off 1: On
linkage
Property description
linkage
@property (nonatomic, assign) NSInteger linkage;
instruction
Bit0: Ring Bit1: Send email Bit2: Screenshot Bit3: Video Bit4: Io output Bit5: Screenshot to cloud Bit6: Video to cloud Bit7: Mobile push
Capture interval seconds
Property description
Capture interval seconds
@property (nonatomic, assign) NSInteger snapInterval;
trigger interval
Property description
Trigger interval
@property (nonatomic, assign) NSInteger triggerInterval;
Sunday
Property description
Sunday
@property (nonatomic, assign) long long schedule0;
instruction
bit0-bit47 represents one day, each bit represents half an hour
281474976710655: Indicates all day
246290738806799: Indicates 00:00 to 02:00, 07:30 to 13:30, 22:30 to 24:00
on Monday
Property description
on Monday
@property (nonatomic, assign) long long schedule1;
Tuesday
Property description
Tuesday
@property (nonatomic, assign) long long schedule2;
Wednesday
Property description
Wednesday
@property (nonatomic, assign) long long schedule3;
Thursday
Property description
Thursday
@property (nonatomic, assign) long long schedule4;
Friday
Property description
Friday
@property (nonatomic, assign) long long schedule5;
Saturday
Property description
Saturday
@property (nonatomic, assign) long long schedule6;
Detection area
Property description
Three detection areas
@property (nonatomic, assign) NSInteger x0;
@property (nonatomic, assign) NSInteger x1;
@property (nonatomic, assign) NSInteger x2;
@property (nonatomic, assign) NSInteger y0;
@property (nonatomic, assign) NSInteger y1;
@property (nonatomic, assign) NSInteger y2;
@property (nonatomic, assign) NSInteger width0;
@property (nonatomic, assign) NSInteger width1;
@property (nonatomic, assign) NSInteger width2;
@property (nonatomic, assign) NSInteger height0;
@property (nonatomic, assign) NSInteger height1;
@property (nonatomic, assign) NSInteger height2;
instruction
First area: Rect(x0, y0, width0, height0)
Second area: Rect(x1, y1, width1, height1)
Third area: Rect(x2, y2, width2, height2)
First zone alert sensitivity
Property description
First zone alert sensitivity
@property (nonatomic, assign) NSInteger sensitivity0;
Second zone alarm sensitivity
Property description
Second zone alarm sensitivity
@property (nonatomic, assign) NSInteger sensitivity1;
The third zone alarm sensitivity
Property description
The third zone alarm sensitivity
@property (nonatomic, assign) NSInteger sensitivity2;
Whether to enable the first area detection alarm
Property description
Whether to enable the first area detection alarm
@property (nonatomic, assign) NSInteger valid0;
Whether to enable the second area detection alarm
Property description
Whether to enable the second area detection alarm
@property (nonatomic, assign) NSInteger valid1;
Whether to enable the third area detection alarm
Property description
Whether to enable the third area detection alarm
@property (nonatomic, assign) NSInteger valid2;
IvyAudioDetect sound detection alarm
switch
Property description
switch
@property (nonatomic, assign) NSInteger isEnable;
instruction
0: Off 1: On
linkage
Property description
linkage
@property (nonatomic, assign) NSInteger linkage;
instruction
Bit0: Ring Bit1: Send email Bit2: Screenshot Bit3: Video Bit4: Io output Bit5: Screenshot to cloud Bit6: Video to cloud Bit7: Mobile push
Sensitivity
Property description
sensitivity
@property (nonatomic, assign) NSInteger sensitivity;
trigger interval
Property description
Trigger interval
@property (nonatomic, assign) NSInteger triggerInterval;
Capture interval
Property description
Capture interval
@property (nonatomic, assign) NSInteger snapInterval;
Sunday
Property description
Sunday
@property (nonatomic, assign) long long schedule0;
instruction
bit0-bit47 represents one day, each bit represents half an hour
281474976710655: Indicates all day
246290738806799: Indicates 00:00 to 02:00, 07:30 to 13:30, 22:30 to 24:00
on Monday
Property description
on Monday
@property (nonatomic, assign) long long schedule1;
Tuesday
Property description
Tuesday
@property (nonatomic, assign) long long schedule2;
Wednesday
Property description
Wednesday
@property (nonatomic, assign) long long schedule3;
Thursday
Property description
Thursday
@property (nonatomic, assign) long long schedule4;
Friday
Property description
Friday
@property (nonatomic, assign) long long schedule5;
Saturday
Property description
Saturday
@property (nonatomic, assign) long long schedule6;
IvyPedestrianDetect Human detection alarm
switch
Property description
switch
@property (nonatomic, assign) BOOL isEnable;
Tracking switch
Property description
Tracking switch
@property (nonatomic, assign) BOOL isTrackEnable;
Linked alarm
Property description
Linkage alarm
@property (nonatomic, assign) NSInteger linkage;
Sensitivity
Property description
Sensitivity
@property (nonatomic, assign) NSInteger sensitivity;
instruction
0: low 1: middle 2: high
Capture time interval
Property description
Capture time interval
@property (nonatomic, assign) NSInteger snapInterval;
trigger interval
Property description
Trigger time interval
@property (nonatomic, assign) NSInteger triggerInterval;
IvyScheduleRecordConfig Schedule recording configuration
Whether to enable scheduled recording
Property description
Whether to enable scheduled recording
@property (nonatomic, assign) BOOL isEnable;
Recording level
Property description
Recording level
@property (nonatomic, assign) NSInteger recordLevel;
Recording processing method after the space is full
Property description
Recording processing method after the space is full
@property (nonatomic, assign) NSInteger spaceFullMode;
instruction
0: Override 1: Stop
whether to include audio
Property description
Whether to include audio
@property (nonatomic, assign) NSInteger isEnableAudio;
instruction
0: No audio included 1: Audio included
Video stream type
Property description
Video stream type
@property (nonatomic, assign) NSInteger streamType;
instruction
0: Main stream 1: Sub stream
Sunday
Property description
Sunday
@property (nonatomic, assign) long long schedule0;
instruction
bit0-bit47 represents one day, each bit represents half an hour
281474976710655: Indicates all day
246290738806799: Indicates 00:00 to 02:00, 07:30 to 13:30, 22:30 to 24:00
on Monday
Property description
on Monday
@property (nonatomic, assign) long long schedule1;
Tuesday
Property description
Tuesday
@property (nonatomic, assign) long long schedule2;
Wednesday
Property description
Wednesday
@property (nonatomic, assign) long long schedule3;
Thursday
Property description
Thursday
@property (nonatomic, assign) long long schedule4;
Friday
Property description
Friday
@property (nonatomic, assign) long long schedule5;
Saturday
Property description
Saturday
@property (nonatomic, assign) long long schedule6;
IvySDInfo SD card information
Whether there is an SD card
Property description
Is there an SD card
@property (nonatomic, assign) BOOL isExist;
SD remaining space
Property description
Free space in SD
@property (nonatomic, assign) unsigned long long freeSpace;
SD card total space
Property description
Total SD card space
@property (nonatomic, assign) unsigned long long totalSpace;
IvyRecordList SD card recording list
Total number of videos
Property description
Total number of videos
@property (nonatomic, assign) NSInteger totalCnt;
####Start number
Property description
Start number
@property (nonatomic, assign) NSInteger startNo;
Video list
Property description
Video list
@property (nonatomic, strong) NSArray<id<IvyRecordObject>> *list;
IvyRecordObject SD Card Recording Information Protocol
Recording object class type
Property description
Recording object class type
@property (nonatomic, assign, readonly) IvyRecordType type;
IvyRecordObject0 SD card recording information model 1
channel number
Property description
channel number
@property (nonatomic, assign) NSInteger channel;
Recording start time
Property description
Recording start time
@property (nonatomic, assign) long long sTime;
Recording end time
Property description
Recording end time
@property (nonatomic, assign) long long eTime;
Recording Type
Property description
Video type
@property (nonatomic, assign) NSInteger recordType;
IvyRecordObject1 SD card recording information model 2
Recording path
Property description
Video path
@property (nonatomic, strong) NSString *filepath;
IvyPictureList SD card picture list
channel number
Property description
channel number
@property (nonatomic, assign) NSInteger channel;
Total
Property description
total
@property (nonatomic, assign) NSUInteger totalCount;
current count
Property description
current count
@property (nonatomic, assign) NSUInteger curCount;
photo list
Property description
photo list
@property (nonatomic, strong) NSArray<IvyPictureInfo *> *list;
IvyPictureInfo SD card picture
Image Format
Property description
Image Format
@property (nonatomic, assign) NSInteger format;
timestamp
Property description
timestamp
@property (nonatomic, assign) unsigned long long time;
Image Type
Property description
Image type
@property (nonatomic, assign) NSInteger type;
IvyDevTime device time
year
Property description
year
@property (nonatomic, assign) NSInteger year;
moon
Property description
moon
@property (nonatomic, assign) NSInteger month;
day
Property description
day
@property (nonatomic, assign) NSInteger day;
Hour
Property description
Hour
@property (nonatomic, assign) NSInteger hour;
minute
Property description
minute
@property (nonatomic, assign) NSInteger min;
Second
Property description
Second
@property (nonatomic, assign) NSInteger sec;
ntp server
Property description
ntp server
@property (nonatomic, strong) NSString *ntpServer;
date format
Property description
date format
@property (nonatomic, assign) NSInteger dateFormat;
instruction
0:YYYY-MM-DD 1:DD/MM/YYYY 2:MM/DD/YYYY
DST duration
Property description
Daylight saving time
@property (nonatomic, assign) NSInteger dst;
Whether there is daylight saving time
Property description
Is there daylight saving time
@property (nonatomic, assign) NSInteger isDst;
instruction
0: No daylight saving time 1: Daylight saving time enabled
Time format
Property description
Time format
@property (nonatomic, assign) NSInteger timeFormat;
instruction
0:24 hours 1:12 hours
time source
Property description
time source
@property (nonatomic, assign) NSInteger timeSource;
instruction
0: NTP 1: Manual synchronization
Time zone
Property description
Time zone
@property (nonatomic, assign) NSInteger timeZone;
IvyWiFiDetail Wi-Fi Information
SSID
Property description
SSID
@property (nonatomic, strong) NSString *ssid;
Mac
Property description
Mac
@property (nonatomic, strong) NSString *mac;
Whether to encrypt
Property description
Whether to encrypt
@property (nonatomic, assign) BOOL encryption;
Signal quality
Property description
Signal quality
@property (nonatomic, assign) NSInteger quality;
instruction
(0-100) The larger the value, the better the signal quality
model
Property description
model
@property (nonatomic, assign) NSInteger mode;
encryption type
Property description
encryption type
@property (nonatomic, assign) NSInteger encryptType;
IvyWiFiConfig Wi-Fi Search Information
SSID
Property description
SSID
@property (nonatomic, strong) NSString *ssid;
Wi-Fi encryption type
Property description
Wi-Fi encryption type
@property (nonatomic, assign) NSInteger encryptType;
IvyStreamParam video stream
GOP
Property description
GOP
@property (nonatomic, assign) int GOP;
bitRate
Property description
bitRate
@property (nonatomic, assign) int bitRate;
frameRate
Property description
frameRate
@property (nonatomic, assign) int frameRate;
isVBR
Property description
isVBR
@property (nonatomic, assign) int isVBR;
resolution
Property description
resolution resolution
@property (nonatomic, assign) int resolution;
IvyPresetPoint preset point
result
Property description
result
@property (nonatomic, assign) NSInteger result;
instruction
0: Success 1: Preset does not exist 2: Parameter error 3: Add factory preset 4: Exist
Preset point name
Property description
Preset point name
@property (nonatomic, strong) NSArray<NSString *> *pointNames;
IvyOSDSettings OSD
Whether to display OSD
Property description
Whether to show OSD
@property (nonatomic, assign) BOOL isEnableOSDMask;
whether to show timestamp
Property description
whether to show timestamp
@property (nonatomic, assign) BOOL isEnableTimeStamp;
Whether to display the device name
Property description
Whether to display the device name
@property (nonatomic, assign) BOOL isEnableDevName;
Whether to display temperature and humidity
Property description
Whether to display temperature and humidity
@property (nonatomic, assign) BOOL isEnableTempAndHumid;
dispPos
Property description
dispPos
@property (nonatomic, assign) NSInteger dispPos;