PlcValueTValueConvertValuesToTTarget(EndianType, EndianType) 方法
将当前 PLC 值转换为目标类型的只读跨度。
命名空间: TouchSocket.PlcBridges程序集: TouchSocketPro.PlcBridges (在 TouchSocketPro.PlcBridges.dll 中) 版本:4.1.4.7+7f7e1f78093c99347956e09330d5d7aca1d2bdf2
public ReadOnlyMemory<TTarget> ConvertValuesTo<TTarget>(
EndianType sourceEndianType,
EndianType targetEndianType
)
where TTarget : struct, new()
Public Function ConvertValuesTo(Of TTarget As {Structure, New}) (
sourceEndianType As EndianType,
targetEndianType As EndianType
) As ReadOnlyMemory(Of TTarget)
member ConvertValuesTo :
sourceEndianType : EndianType *
targetEndianType : EndianType -> ReadOnlyMemory<'TTarget> when 'TTarget : struct, new()
- sourceEndianType EndianType
- 源字节序类型。
- targetEndianType EndianType
- 目标字节序类型。
- TTarget
- 目标类型,必须是非托管类型。
ReadOnlyMemoryTTarget返回目标类型的只读跨度。