Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: AOI Rung Instruction #29

Closed
jojoguy10 opened this issue May 20, 2024 · 2 comments
Closed

Feature Request: AOI Rung Instruction #29

jojoguy10 opened this issue May 20, 2024 · 2 comments

Comments

@jojoguy10
Copy link

I was thinking it might not be that difficult to generate the rung instruction neutral text for an AOI. I was playing around with it, and it seems like it follows the same pattern:
<AOI Name>(<AOI Tag>, <InOut Tags>, <Input Tags>, <Output Tags>);

Maybe it's that easy?

@tnunnink
Copy link
Owner

Yeah, not too bad. I think only Parameters with Required checked are those that are included in the instruction signature. I can add a couple methods to generate a Instruction or NeutralText object, but all it would do is set the instruction key. You'd have to provide the remaining arguments as either references to tags or immediate atomic values. We can't get that info from the AOI itself.

For example:

var aoi = new AddOnInstruction("TestAOI");
var text = aoi.ToText("TestAoiTag", "Param1", "Param2", 123, 0);
text.Should().Be("TestAOI(TestAoiTag,Param1,Param2,123,0)");

All this would do is call New() on the Instruction class internally and provide it the name of the AOI.

var instruction = Instruction.New("TestAOI", "TestAoiTag", "Param1", "Param2", 123, 0);
instruction.Text.Should().Be("TestAOI(TestAoiTag,Param1,Param2,123,0)");

Let me know if that is what you are looking for or not.

@tnunnink
Copy link
Owner

tnunnink commented Jun 3, 2024

3.0.0 adds these methods in case you are interested.

@tnunnink tnunnink closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants