Skip to content

Commit bc9fc76

Browse files
authored
virtual-device-app: Enable WindowCovering cluster (project-chip#32906)
Signed-off-by: Jaehoon You <jaehoon.you@samsung.com> Signed-off-by: Charles Kim <chulspro.kim@samsung.com>
1 parent fffec4c commit bc9fc76

File tree

2 files changed

+708
-0
lines changed

2 files changed

+708
-0
lines changed

examples/virtual-device-app/virtual-device-common/virtual-device-app.matter

+192
Original file line numberDiff line numberDiff line change
@@ -2688,6 +2688,159 @@ cluster DoorLock = 257 {
26882688
timed command access(invoke: administer) ClearAliroReaderConfig(): DefaultSuccess = 41;
26892689
}
26902690

2691+
/** Provides an interface for controlling and adjusting automatic window coverings. */
2692+
cluster WindowCovering = 258 {
2693+
revision 5;
2694+
2695+
enum EndProductType : enum8 {
2696+
kRollerShade = 0;
2697+
kRomanShade = 1;
2698+
kBalloonShade = 2;
2699+
kWovenWood = 3;
2700+
kPleatedShade = 4;
2701+
kCellularShade = 5;
2702+
kLayeredShade = 6;
2703+
kLayeredShade2D = 7;
2704+
kSheerShade = 8;
2705+
kTiltOnlyInteriorBlind = 9;
2706+
kInteriorBlind = 10;
2707+
kVerticalBlindStripCurtain = 11;
2708+
kInteriorVenetianBlind = 12;
2709+
kExteriorVenetianBlind = 13;
2710+
kLateralLeftCurtain = 14;
2711+
kLateralRightCurtain = 15;
2712+
kCentralCurtain = 16;
2713+
kRollerShutter = 17;
2714+
kExteriorVerticalScreen = 18;
2715+
kAwningTerracePatio = 19;
2716+
kAwningVerticalScreen = 20;
2717+
kTiltOnlyPergola = 21;
2718+
kSwingingShutter = 22;
2719+
kSlidingShutter = 23;
2720+
kUnknown = 255;
2721+
}
2722+
2723+
enum Type : enum8 {
2724+
kRollerShade = 0;
2725+
kRollerShade2Motor = 1;
2726+
kRollerShadeExterior = 2;
2727+
kRollerShadeExterior2Motor = 3;
2728+
kDrapery = 4;
2729+
kAwning = 5;
2730+
kShutter = 6;
2731+
kTiltBlindTiltOnly = 7;
2732+
kTiltBlindLiftAndTilt = 8;
2733+
kProjectorScreen = 9;
2734+
kUnknown = 255;
2735+
}
2736+
2737+
bitmap ConfigStatus : bitmap8 {
2738+
kOperational = 0x1;
2739+
kOnlineReserved = 0x2;
2740+
kLiftMovementReversed = 0x4;
2741+
kLiftPositionAware = 0x8;
2742+
kTiltPositionAware = 0x10;
2743+
kLiftEncoderControlled = 0x20;
2744+
kTiltEncoderControlled = 0x40;
2745+
}
2746+
2747+
bitmap Feature : bitmap32 {
2748+
kLift = 0x1;
2749+
kTilt = 0x2;
2750+
kPositionAwareLift = 0x4;
2751+
kAbsolutePosition = 0x8;
2752+
kPositionAwareTilt = 0x10;
2753+
}
2754+
2755+
bitmap Mode : bitmap8 {
2756+
kMotorDirectionReversed = 0x1;
2757+
kCalibrationMode = 0x2;
2758+
kMaintenanceMode = 0x4;
2759+
kLedFeedback = 0x8;
2760+
}
2761+
2762+
bitmap OperationalStatus : bitmap8 {
2763+
kGlobal = 0x3;
2764+
kLift = 0xC;
2765+
kTilt = 0x30;
2766+
}
2767+
2768+
bitmap SafetyStatus : bitmap16 {
2769+
kRemoteLockout = 0x1;
2770+
kTamperDetection = 0x2;
2771+
kFailedCommunication = 0x4;
2772+
kPositionFailure = 0x8;
2773+
kThermalProtection = 0x10;
2774+
kObstacleDetected = 0x20;
2775+
kPower = 0x40;
2776+
kStopInput = 0x80;
2777+
kMotorJammed = 0x100;
2778+
kHardwareFailure = 0x200;
2779+
kManualOperation = 0x400;
2780+
kProtection = 0x800;
2781+
}
2782+
2783+
readonly attribute Type type = 0;
2784+
readonly attribute optional int16u physicalClosedLimitLift = 1;
2785+
readonly attribute optional int16u physicalClosedLimitTilt = 2;
2786+
readonly attribute optional nullable int16u currentPositionLift = 3;
2787+
readonly attribute optional nullable int16u currentPositionTilt = 4;
2788+
readonly attribute optional int16u numberOfActuationsLift = 5;
2789+
readonly attribute optional int16u numberOfActuationsTilt = 6;
2790+
readonly attribute ConfigStatus configStatus = 7;
2791+
readonly attribute optional nullable percent currentPositionLiftPercentage = 8;
2792+
readonly attribute optional nullable percent currentPositionTiltPercentage = 9;
2793+
readonly attribute OperationalStatus operationalStatus = 10;
2794+
readonly attribute optional nullable percent100ths targetPositionLiftPercent100ths = 11;
2795+
readonly attribute optional nullable percent100ths targetPositionTiltPercent100ths = 12;
2796+
readonly attribute EndProductType endProductType = 13;
2797+
readonly attribute optional nullable percent100ths currentPositionLiftPercent100ths = 14;
2798+
readonly attribute optional nullable percent100ths currentPositionTiltPercent100ths = 15;
2799+
readonly attribute optional int16u installedOpenLimitLift = 16;
2800+
readonly attribute optional int16u installedClosedLimitLift = 17;
2801+
readonly attribute optional int16u installedOpenLimitTilt = 18;
2802+
readonly attribute optional int16u installedClosedLimitTilt = 19;
2803+
attribute access(write: manage) Mode mode = 23;
2804+
readonly attribute optional SafetyStatus safetyStatus = 26;
2805+
readonly attribute command_id generatedCommandList[] = 65528;
2806+
readonly attribute command_id acceptedCommandList[] = 65529;
2807+
readonly attribute event_id eventList[] = 65530;
2808+
readonly attribute attrib_id attributeList[] = 65531;
2809+
readonly attribute bitmap32 featureMap = 65532;
2810+
readonly attribute int16u clusterRevision = 65533;
2811+
2812+
request struct GoToLiftValueRequest {
2813+
int16u liftValue = 0;
2814+
}
2815+
2816+
request struct GoToLiftPercentageRequest {
2817+
percent100ths liftPercent100thsValue = 0;
2818+
}
2819+
2820+
request struct GoToTiltValueRequest {
2821+
int16u tiltValue = 0;
2822+
}
2823+
2824+
request struct GoToTiltPercentageRequest {
2825+
percent100ths tiltPercent100thsValue = 0;
2826+
}
2827+
2828+
/** Moves window covering to InstalledOpenLimitLift and InstalledOpenLimitTilt */
2829+
command UpOrOpen(): DefaultSuccess = 0;
2830+
/** Moves window covering to InstalledClosedLimitLift and InstalledCloseLimitTilt */
2831+
command DownOrClose(): DefaultSuccess = 1;
2832+
/** Stop any adjusting of window covering */
2833+
command StopMotion(): DefaultSuccess = 2;
2834+
/** Go to lift value specified */
2835+
command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4;
2836+
/** Go to lift percentage specified */
2837+
command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5;
2838+
/** Go to tilt value specified */
2839+
command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7;
2840+
/** Go to tilt percentage specified */
2841+
command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8;
2842+
}
2843+
26912844
/** Attributes and commands for controlling the color properties of a color-capable light. */
26922845
cluster ColorControl = 768 {
26932846
revision 6;
@@ -3505,6 +3658,45 @@ endpoint 1 {
35053658
handle command ClearCredential;
35063659
}
35073660

3661+
server cluster WindowCovering {
3662+
ram attribute type default = 0x00;
3663+
ram attribute physicalClosedLimitLift default = 0x0000;
3664+
ram attribute physicalClosedLimitTilt default = 0x0000;
3665+
ram attribute currentPositionLift;
3666+
ram attribute currentPositionTilt;
3667+
ram attribute numberOfActuationsLift default = 0x0000;
3668+
ram attribute numberOfActuationsTilt default = 0x0000;
3669+
ram attribute configStatus default = 0x03;
3670+
ram attribute currentPositionLiftPercentage;
3671+
ram attribute currentPositionTiltPercentage;
3672+
ram attribute operationalStatus default = 0x00;
3673+
ram attribute targetPositionLiftPercent100ths;
3674+
ram attribute targetPositionTiltPercent100ths;
3675+
ram attribute endProductType default = 0x00;
3676+
ram attribute currentPositionLiftPercent100ths;
3677+
ram attribute currentPositionTiltPercent100ths;
3678+
ram attribute installedOpenLimitLift default = 0x0000;
3679+
ram attribute installedClosedLimitLift default = 0xFFFF;
3680+
ram attribute installedOpenLimitTilt default = 0x0000;
3681+
ram attribute installedClosedLimitTilt default = 0xFFFF;
3682+
ram attribute mode default = 0x00;
3683+
ram attribute safetyStatus default = 0x0000;
3684+
callback attribute generatedCommandList;
3685+
callback attribute acceptedCommandList;
3686+
callback attribute eventList;
3687+
callback attribute attributeList;
3688+
ram attribute featureMap default = 0;
3689+
ram attribute clusterRevision default = 5;
3690+
3691+
handle command UpOrOpen;
3692+
handle command DownOrClose;
3693+
handle command StopMotion;
3694+
handle command GoToLiftValue;
3695+
handle command GoToLiftPercentage;
3696+
handle command GoToTiltValue;
3697+
handle command GoToTiltPercentage;
3698+
}
3699+
35083700
server cluster ColorControl {
35093701
ram attribute currentHue default = 0x00;
35103702
ram attribute currentSaturation default = 0x00;

0 commit comments

Comments
 (0)