Skip to content

Commit

Permalink
Temporarilily revert additions in libplctag.NET so that NativeImport …
Browse files Browse the repository at this point in the history
…can be built and released
  • Loading branch information
timyhac committed Jun 15, 2024
1 parent 59bfc5d commit 39621c1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/libplctag/INativeTag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ interface INativeTag
sbyte plc_tag_get_int8(int tag, int offset);
int plc_tag_get_int_attribute(int tag, string attrib_name, int default_value);
int plc_tag_set_int_attribute(int tag, string attrib_name, int new_value);
int plc_tag_get_byte_array_attribute(int tag, string attrib_name, byte[] buffer, int buffer_length);
int plc_tag_get_size(int tag);
int plc_tag_set_size(int tag, int new_size);
ushort plc_tag_get_uint16(int tag, int offset);
Expand Down
1 change: 0 additions & 1 deletion src/libplctag/NativeTag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class NativeTag : INativeTag
public int plc_tag_abort(Int32 tag) => plctag.plc_tag_abort(tag);
public int plc_tag_get_int_attribute(Int32 tag, string attrib_name, int default_value) => plctag.plc_tag_get_int_attribute(tag, attrib_name, default_value);
public int plc_tag_set_int_attribute(Int32 tag, string attrib_name, int new_value) => plctag.plc_tag_set_int_attribute(tag, attrib_name, new_value);
public int plc_tag_get_byte_array_attribute(Int32 tag, string attrib_name, byte[] buffer, int buffer_length) => plctag.plc_tag_get_byte_array_attribute(tag, attrib_name, buffer, buffer_length);
public UInt64 plc_tag_get_uint64(Int32 tag, int offset) => plctag.plc_tag_get_uint64(tag, offset);
public Int64 plc_tag_get_int64(Int32 tag, int offset) => plctag.plc_tag_get_int64(tag, offset);
public int plc_tag_set_uint64(Int32 tag, int offset, UInt64 val) => plctag.plc_tag_set_uint64(tag, offset, val);
Expand Down
14 changes: 0 additions & 14 deletions src/libplctag/NativeTagWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -528,20 +528,6 @@ private void SetIntAttribute(string attributeName, int value)
ThrowIfStatusNotOk(result);
}

public byte[] GetByteArrayAttribute(string attributeName)
{
ThrowIfAlreadyDisposed();

var bufferLengthAttributeName = attributeName + ".length";
var bufferLength = GetIntAttribute(bufferLengthAttributeName);
var buffer = new byte[bufferLength];

var result = (Status)_native.plc_tag_get_byte_array_attribute(nativeTagHandle, attributeName, buffer, buffer.Length);
ThrowIfStatusNotOk(result);

return buffer;
}

private void SetDebugLevel(DebugLevel level)
{
_native.plc_tag_set_debug_level((int)level);
Expand Down
4 changes: 0 additions & 4 deletions src/libplctag/Tag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,6 @@ public uint? StringTotalLength
public void GetBuffer(byte[] buffer) => _tag.GetBuffer(buffer);
public void SetBuffer(byte[] newBuffer) => _tag.SetBuffer(newBuffer);

/// <summary>
/// This function retrieves an attribute of the raw tag byte array.
/// </summary>
public byte[] GetByteArrayAttribute(string attributeName) => _tag.GetByteArrayAttribute(attributeName);
public int GetSize() => _tag.GetSize();
public void SetSize(int newSize) => _tag.SetSize(newSize);

Expand Down

0 comments on commit 39621c1

Please sign in to comment.