libplctag.NET: In the StringPlcMapper, Omron is not present

In the StringPlcMapper, Omron is not present

using System;

namespace libplctag.DataTypes;

public class StringPlcMapper : PlcMapperBase<string>
{
    public override int? ElementSize => base.PlcType switch
    {
        PlcType.ControlLogix => 88,
        PlcType.Plc5 => 84,
        PlcType.Slc500 => 84,
        PlcType.LogixPccc => 84,
        PlcType.Micro800 => 256,
        PlcType.MicroLogix => 84,
        _ => throw new NotImplementedException(),
    };

    public override string Decode(Tag tag, int offset)
    {
        return tag.GetString(offset);
    }

    public override void Encode(Tag tag, int offset, string value)
    {
        tag.SetString(offset, value);
    }
}

I have the same issue as https://github.com/libplctag/libplctag.NET/issues/359

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 21 (6 by maintainers)

Most upvoted comments

@zN3utr4l - your diagnosis was correct and a new version of libplctag.NET has been published with a fix.