QNSlimDeviceConfig

Device configuration class for the Slim Scale

Property Overview

Name Type Description
alarmOperation QNSlimAlarmOperation Alarm reminder operation type, supports no modification, turn off, and turn on (with specific reminder days)
alarmWeekDays QNSlimAlarmWeekDays Collection of effective alarm days. All effective days share the same reminder time (alarmHourand alarmMinute). Required and valid only when alarmOperationis QNSlimAlarmOperationSetDays.
alarmHour int Alarm reminder hour; Required and effective when alarmOperationis QNSlimAlarmOperationSetDays. Value range: [0, 23]
alarmMinute int Alarm reminder minute; Required and effective when alarmOperationis QNSlimAlarmOperationSetDays. Value range: [0, 59]
voiceVolume QNSlimVoiceVolume Prompt tone volume, supports no modification and 4-level volume adjustment (Level 1-4).
alarmVoice QNSlimVoiceConfig Alarm reminder prompt tone configuration
measureStartVoice QNSlimVoiceConfig Prompt tone configuration for starting measurement
measureFinishVoice QNSlimVoiceConfig Prompt tone configuration for completing measurement
completeGoalVoice QNSlimVoiceConfig Prompt tone configuration for achieving goal

Enumeration Descriptions

QNSlimAlarmOperation

Alarm operation type enumeration, used to control the alarm reminder settings of the device. Supports no modification, turn off, and turn on.

typedef NS_ENUM(NSInteger, QNSlimAlarmOperation) {
    QNSlimAlarmOperationNoModify,   // Do not modify alarm settings
    QNSlimAlarmOperationCloseAll,   // Turn off all alarms
    QNSlimAlarmOperationSetDays     // Turn on and set specific effective days
};

Enumeration Value Descriptions

Enumeration Value Value Description
QNSlimAlarmOperationNoModify 0 No modification: Preserve the device's original alarm settings
QNSlimAlarmOperationCloseAll 1 Close all: Turn off all alarms
QNSlimAlarmOperationSetDays 2 Set days: Set effective days according to the alarmWeekDaysproperty

QNSlimAlarmWeekDays

Alarm effective days enumeration

typedef NS_OPTIONS(NSInteger, QNSlimAlarmWeekDays) {
    QNSlimAlarmWeekDayMonday    = 1 << 0,   // Monday
    QNSlimAlarmWeekDayTuesday   = 1 << 1,   // Tuesday
    QNSlimAlarmWeekDayWednesday = 1 << 2,   // Wednesday
    QNSlimAlarmWeekDayThursday  = 1 << 3,   // Thursday
    QNSlimAlarmWeekDayFriday    = 1 << 4,   // Friday
    QNSlimAlarmWeekDaySaturday  = 1 << 5,   // Saturday
    QNSlimAlarmWeekDaySunday    = 1 << 6,   // Sunday
};

Enumeration Value Descriptions

Enumeration Value Value Description
QNSlimAlarmWeekDayMonday 1(0x01), 1 << 0 Effective on Monday
QNSlimAlarmWeekDayTuesday 2(0x02), 1 << 1 Effective on Tuesday
QNSlimAlarmWeekDayWednesday 4(0x04), 1 << 2 Effective on Wednesday
QNSlimAlarmWeekDayThursday 8(0x08), 1 << 3 Effective on Thursday
QNSlimAlarmWeekDayFriday 16(0x10), 1 << 4 Effective on Friday
QNSlimAlarmWeekDaySaturday 32(0x20), 1 << 5 Effective on Saturday
QNSlimAlarmWeekDaySunday 64(0x40), 1 << 6 Effective on Sunday

Usage Rules

1. Property Association Rules
  • The alarmWeekDaysproperty is only effective when alarmOperation == QNSlimAlarmOperationSetDays.
  • When alarmOperationhas other values, alarmWeekDayswill be ignored.
2. Default Value
alarmOperation = QNSlimAlarmOperationNoModify; // Default: No modification
3. Operation Type Priority

Only the alarmOperationtype needs to be considered during configuration; no priority conflict handling is required.


Usage Examples

Scenario 1: Do not modify alarm settings
self.alarmOperation = QNSlimAlarmOperationNoModify; // weekDays value will be ignored
Scenario 2: Turn off all alarms
self.alarmOperation = QNSlimAlarmOperationCloseAll; // weekDays value will be ignored
Scenario 3: Set specific effective days
// Custom combination (Monday, Wednesday, Friday)
self.alarmOperation = QNSlimAlarmOperationSetDays;
self.alarmWeekDays = QNSlimAlarmWeekDayMonday | 
                     QNSlimAlarmWeekDayWednesday | 
                     QNSlimAlarmWeekDayFriday;

QNSlimVoiceVolume

Prompt tone volume control enumeration, used to adjust the volume level of device prompt tones. Supports no modification and 4-level volume adjustment.

typedef NS_ENUM(NSUInteger, QNSlimVoiceVolume) {
    QNSlimVoiceVolumeNoModify = 0,   // Do not modify current volume settings
    QNSlimVoiceVolumeLevel1   = 1,   // Volume Level 1
    QNSlimVoiceVolumeLevel2   = 2,   // Volume Level 2
    QNSlimVoiceVolumeLevel3   = 3,   // Volume Level 3
    QNSlimVoiceVolumeLevel4   = 4    // Volume Level 4
};

Enumeration Value Descriptions

Enumeration Value Value Description
QNSlimVoiceVolumeNoModify 0 No modification: Preserve the device's current volume settings.
QNSlimVoiceVolumeLevel1 1 Volume Level 1
QNSlimVoiceVolumeLevel2 2 Volume Level 2
QNSlimVoiceVolumeLevel3 3 Volume Level 3
QNSlimVoiceVolumeLevel4 4 Volume Level 4

Usage Rules

  1. Special Value Handling:
    • NoModifyhas the highest priority. Setting this value will ignore other volume options.
  2. Default Behavior:
    • Default value is QNSlimVoiceVolumeNoModify.
    • A value of 0 is treated as NoModify.
  3. Volume Level Description:
    • Levels 1-4 represent volume from low to high.
    • Actual volume effects depend on device hardware implementation.

results matching ""

    No results matching ""