/// <summary> /// 转为字符串形式OBIS参数 /// </summary> /// <param name="parameter">地址命令参数类实例</param> /// <returns>字符串形式OBIS参数</returns> protected override string FormatReadParameter(AddressCommandParameter parameter) { return(string.Format("0x{0:X8},0x{1:X}", parameter.Address, parameter.Length)); }
/// <summary> /// 转为字符串形式OBIS参数 /// </summary> /// <param name="parameter">地址命令参数类实例</param> /// <returns>字符串形式OBIS参数</returns> protected override string FormatWriteParameter(AddressCommandParameter parameter) { return(string.Format("0x{0:X2},0x{1:X4},{2}", parameter.ChipSelect, parameter.Address, parameter.Data)); }
/// <summary> /// 转为字符串形式OBIS参数 /// </summary> /// <param name="parameter">地址命令参数类实例</param> /// <returns>字符串形式OBIS参数</returns> protected override string FormatWriteParameter(AddressCommandParameter parameter) { return(string.Format("0x{0:X8},{1:X}", parameter.Address, Encoding.ASCII.GetBytes(parameter.Data))); }
/// <summary> /// 转为字符串形式OBIS参数 /// </summary> /// <param name="parameter">地址命令参数类实例</param> /// <returns>字符串形式OBIS参数</returns> protected abstract string FormatReadParameter(AddressCommandParameter parameter);
/// <summary> /// 转为字符串形式OBIS参数 /// </summary> /// <param name="parameter">地址命令参数类实例</param> /// <returns>字符串形式OBIS参数</returns> protected override string FormatWriteParameter(AddressCommandParameter parameter) { return(string.Format("0x{0:X8}", parameter.Address)); }