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

No IntelliSense information when there is no ModuleId attribute in the Cpu.pkg file #23

Closed
Radeonmann opened this issue Nov 30, 2021 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Radeonmann
Copy link
Collaborator

When there is no ModuleId attribute in the <Configuration> Element of the Cpu.pkg, the parsing of the information is aborted and no IntelliSense information is provided.

Currently the ModuleId information is not actively used and for the future it should just skip the additional information gained by the ModuleId, probably with a warning.

Example for a non working file with AR V4.02 (probably created in an old AS version)

<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio FileVersion="4.9"?>
<Cpu xmlns="http://br-automation.co.at/AS/Cpu">
  <Objects>
    <Object Type="File" Description="I/O Zuordnungsdatei">IoMap.iom</Object>
    <Object Type="File" Description="PV Zuordnungsdatei">PvMap.vvm</Object>
    <Object Type="File" Description="Software Konfiguration">Cpu.sw</Object>
    <Object Type="File" Description="Deklaration von permanenten Variablen">Cpu.per</Object>
    <Object Type="Package">Motion</Object>
  </Objects>
  <Configuration HasNcOperatingSystem="true" LocalVariablesMemory="MemoryPool">
    <AutomationRuntime Version="V4.02" />
    <Build GccVersion="4.1.2" GeneratePPCode="false" />
    <DefaultTargetMemory DataObjects="UserROM" Libraries="UserROM" Tasks="UserROM" />
    <Io Xxxxx="xxxxxx" />
    <Safety SafetyRelease="0.0" />
    <Simulation StartAR000="true" TerminateAR000="true" />
    <TaskClasses DefaultIoTaskClass="Automatic" DefaultTaskClass="Cyclic4" />
    <Transfer Xxxxx="xxxxxx" />
    <Vc FirmwareVersion="V3.95.9" />
  </Configuration>
</Cpu>

Example for a working file:

<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio Version=4.6.5.78 SP?>
<Cpu xmlns="http://br-automation.co.at/AS/Cpu">
  <Objects>
    <Object Type="File" Description="Software configuration">Cpu.sw</Object>
    <Object Type="File" Description="Permanent variables">Cpu.per</Object>
    <Object Type="File" Description="I/O mapping">IoMap.iom</Object>
    <Object Type="File" Description="Variable mapping">PvMap.vvm</Object>
    <Object Type="Package">Connectivity</Object>
    <Object Type="Package">TextSystem</Object>
    <Object Type="Package">UnitSystem</Object>
    <Object Type="Package">AccessAndSecurity</Object>
    <Object Type="Package">mappControl</Object>
    <Object Type="Package">mappMotion</Object>
    <Object Type="Package">mappServices</Object>
    <Object Type="Package">mappView</Object>
    <Object Type="Package">mappCockpit</Object>
  </Objects>
  <Configuration ModuleId="X20CP1586">
    <AutomationRuntime Version="C4.63" />
    <Build  Xxxxx="xxxxxx" />
    <DefaultTargetMemory Tasks="UserROM" />
    <Vc FirmwareVersion="V4.62.0" />
  </Configuration>
</Cpu>

Example for a working file with AR N4.02 (created in AS V4.6):

<?xml version="1.0" encoding="utf-8"?>
<?AutomationStudio Version=4.6.5.78 SP?>
<Cpu xmlns="http://br-automation.co.at/AS/Cpu">
  <Objects>
    <Object Type="File" Description="Software configuration">Cpu.sw</Object>
    <Object Type="File" Description="Permanent variables">Cpu.per</Object>
    <Object Type="File" Description="I/O mapping">IoMap.iom</Object>
    <Object Type="File" Description="Variable mapping">PvMap.vvm</Object>
    <Object Type="Package">Connectivity</Object>
    <Object Type="Package">TextSystem</Object>
    <Object Type="Package">UnitSystem</Object>
    <Object Type="Package">AccessAndSecurity</Object>
    <Object Type="Package">mappControl</Object>
    <Object Type="Package">mappMotion</Object>
    <Object Type="Package">mappServices</Object>
    <Object Type="Package">mappView</Object>
    <Object Type="Package">mappCockpit</Object>
  </Objects>
  <Configuration ModuleId="X20CP1585">
    <AutomationRuntime Version="N4.02" />
    <Build GccVersion="4.1.2" />
    <DefaultTargetMemory Tasks="UserROM" />
    <Vc FirmwareVersion="V4.62.0" />
  </Configuration>
</Cpu>
@Radeonmann Radeonmann added the bug Something isn't working label Nov 30, 2021
@Radeonmann Radeonmann added this to the v0.0.4 milestone Nov 30, 2021
@Radeonmann Radeonmann self-assigned this Nov 30, 2021
@Radeonmann
Copy link
Collaborator Author

InteeliSense information was still provided, but an error was shown in the log output. The behavior was changed to show only warnings and be generally more forgiving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant