设置生理周期
功能表
__IDO_FUNCTABLE__.funcTable20Model.menstruation
生理周期模型说明
- IDOSetMenstruationInfoBluetoothModel
参数 | 说明 | 备注 |
---|---|---|
onOff | 开关 | bool |
menstrualLength | 经期长度 | int |
menstrualCycle | 经期周期 | int |
lastMenstrualYear | 最近经期年份 | int |
lastMenstrualMonth | 最近经期月份 | int |
lastMenstrualDay | 最近经期日期 | int |
ovulationIntervalDay | 排卵日的间隔 | int |
ovulationBeforeDay | 经期前一天 | int |
ovulationAfterDay | 经期后一天 | int |
notifyFlag | 通知类型 | 0无效 ; 1:允许通知; 2:静默通知; 3:关闭通知 |
命令代码
Objc:
IDOSetMenstruationInfoBluetoothModel * model = [IDOSetMenstruationInfoBluetoothModel currentModel];
[IDOFoundationCommand setMenstrualCommand:model
callback:^(int errorCode) {
if (errorCode == 0) {
//设置成功
}else if (errorCode == 6) {
//设备不支持
}else {
//设置失败
}
}];
Swift:
let model = IDOSetMenstruationInfoBluetoothModel.current();
IDOFoundationCommand.setMenstrual(model) { (errorCode) in
if errorCode == 0 {
//设置成功
}else if errorCode == 6{
//设备不支持此方法
}else {
//设置错误
}
};