Skip to content

Commit

Permalink
improve naming
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Mar 31, 2024
1 parent 70ae02a commit 8b71ac8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
42 changes: 21 additions & 21 deletions src/Smdn.Net.EchonetLite/Smdn.Net.EchonetLite/EchonetProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ byte epc
classGroupCode: classGroupCode,
classCode: classCode,
epc: epc,
isPropertyAnno: false,
isPropertySet: false,
isPropertyGet: false
isAnno: false,
isSet: false,
isGet: false
)
{
}
Expand All @@ -59,18 +59,18 @@ public EchonetProperty
byte classGroupCode,
byte classCode,
byte epc,
bool isPropertyAnno,
bool isPropertySet,
bool isPropertyGet
bool isAnno,
bool isSet,
bool isGet
)
: this
(
spec:
SpecificationUtil.FindProperty(classGroupCode, classCode, epc) ??
GenerateUnknownProperty(epc),
isPropertyAnno: isPropertyAnno,
isPropertySet: isPropertySet,
isPropertyGet: isPropertyGet
isAnno: isAnno,
isSet: isSet,
isGet: isGet
)
{
}
Expand All @@ -79,25 +79,25 @@ public EchonetProperty(EchonetPropertySpecification spec)
: this
(
spec: spec,
isPropertyAnno: false,
isPropertySet: false,
isPropertyGet: false
isAnno: false,
isSet: false,
isGet: false
)
{
}

public EchonetProperty
(
EchonetPropertySpecification spec,
bool isPropertyAnno,
bool isPropertySet,
bool isPropertyGet
bool isAnno,
bool isSet,
bool isGet
)
{
Spec = spec ?? throw new ArgumentNullException(nameof(spec));
Anno = isPropertyAnno;
Set = isPropertySet;
Get = isPropertyGet;
IsAnno = isAnno;
IsSet = isSet;
IsGet = isGet;
}

/// <summary>
Expand All @@ -109,17 +109,17 @@ bool isPropertyGet
/// プロパティ値の読み出し・通知要求のサービスを処理する。
/// プロパティ値読み出し要求(0x62)、プロパティ値書き込み・読み出し要求(0x6E)、プロパティ値通知要求(0x63)の要求受付処理を実施する。
/// </summary>
public bool Get { get; }
public bool IsGet { get; }
/// <summary>
/// プロパティ値の書き込み要求のサービスを処理する。
/// プロパティ値書き込み要求(応答不要)(0x60)、プロパティ値書き込み要求(応答要)(0x61)、プロパティ値書き込み・読み出し要求(0x6E)の要求受付処理を実施する。
/// </summary>
public bool Set { get; }
public bool IsSet { get; }
/// <summary>
/// プロパティ値の通知要求のサービスを処理する。
/// プロパティ値通知要求(0x63)の要求受付処理を実施する。
/// </summary>
public bool Anno { get; }
public bool IsAnno { get; }

private ArrayBufferWriter<byte>? _value = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public static string GetDebugString(this EchonetProperty property)
sb.AppendFormat(provider: null, "0x{0:X2}", property.Spec.Code);
sb.Append(property.Spec.Name);
sb.Append(' ');
sb.Append(property.Get ? "Get" : "");
sb.Append(property.IsGet ? "Get" : "");
sb.Append(property.Spec.GetRequired ? "(Req)" : "");
sb.Append(' ');
sb.Append(property.Set ? "Set" : "");
sb.Append(property.IsSet ? "Set" : "");
sb.Append(property.Spec.SetRequired ? "(Req)" : "");
sb.Append(' ');
sb.Append(property.Anno ? "Anno" : "");
sb.Append(property.IsAnno ? "Anno" : "");
sb.Append(property.Spec.AnnoRequired ? "(Req)" : "");
return sb.ToString();
}
Expand Down

0 comments on commit 8b71ac8

Please sign in to comment.