Skip to content

Upstream merges (#28) #69

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 32 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Test

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Show current Git branch
run: git branch --show-current

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc g++ cmake golang uuid-dev

- name: Run pre-build script
run: |
chmod +x ./build_clean_linux64.sh
./build_clean_linux64.sh
shell: bash

- name: Run unit tests
run: ./build_linux64/Output/amc_unittest
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@
[submodule "submodules/libjpeg-turbo"]
path = submodules/libjpeg-turbo
url = https://github.com/libjpeg-turbo/libjpeg-turbo.git
[submodule "submodules/TinyJPEG"]
path = submodules/TinyJPEG
url = https://github.com/serge-rgb/TinyJPEG.git
[submodule "submodules/stb"]
path = submodules/stb
url = https://github.com/nothings/stb.git
42 changes: 40 additions & 2 deletions ACT/LibMC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,40 @@
<error name="INVALIDCONTENTSTATEID" code="632" description="Invalid content state ID" />
<error name="INVALIDWIDGETREQUEST" code="633" description="Invalid widget request" />
<error name="SOURCEVARIABLENOTFOUND" code="634" description="Source variable not found" />
<error name="INVALIDEVENTRETURNVALUES" code="635" description="Invalid event return values" />
<error name="INVALIDMODIFIERINTERPOLATIONCOUNT" code="636" description="Invalid modifier interpolation count" />
<error name="INVALIDTOOLPATHMODIFIERTYPE" code="637" description="Invalid toolpath modifier type." />
<error name="INVALIDTOOLPATHMODIFIERFACTOR" code="638" description="Invalid toolpath modifier factor." />
<error name="BINARYMETADATARELATIONSHIPNOTFOUND" code="639" description="Binary metadata relationship not found." />
<error name="ENVIRONMENTVARIABLECHANGEAFTERSTART" code="640" description="Environment variable change after start." />
<error name="INVALIDENVIRONMENTVARIABLENAME" code="641" description="Invalid environment variable name." />
<error name="ENVIRONMENTVARIABLEALREADYEXISTS" code="642" description="Environment variable already exists." />
<error name="REACHEDENVIRONMENTVARIABLELIMIT" code="643" description="Reached Environment variable limit." />
<error name="ENVIRONMENTVARIABLENOTFOUND" code="644" description="Environment Variable not found." />
<error name="INVALIDENVIRONMENTVARIABLEINDEX" code="645" description="Invalid environment variable index." />
<error name="COULDNOTREADPROCESSPIPE" code="646" description="Could not read process pipe." />
<error name="PROCESSEXECUTABLENOTFOUND" code="647" description="Process executable not found." />
<error name="COULDNOTCREATEPROCESSPIPE" code="648" description="Could not create process pipe." />
<error name="CREATEPROCESSFAILED" code="649" description="Create process failed." />
<error name="PROCESSEXECUTABLEDIRECTORYDOESNOTEXIST" code="650" description="Process executable directory does not exist." />
<error name="PROCESSCONTROLTIMEISINVALID" code="651" description="Process control time is invalid." />
<error name="PROCESSWORKINGDIRECTORYDOESNOTEXIST" code="652" description="Process working directory does not exist." />
<error name="PROCESSHASALREADYBEENSTARTED" code="653" description="Process has already been started." />
<error name="PROCESSHANDLINGNOTIMPLEMENTEDONPLATFORM" code="654" description="Process handling not implemented on Platform." />
<error name="INVALIDWRITEBUFFFERPOSITION" code="655" description="Invalid write buffer position." />
<error name="INVALIDWRITEBUFFERSIZE" code="656" description="Invalid write buffer size." />
<error name="CANNOTWRITETOFINISHEDFILE" code="658" description="Cannot write to finished file." />
<error name="WORKINGDIRECTORYHASBEENCLEANED" code="659" description="Working Directory has been cleaned." />
<error name="INVALIDCHARACTERINFILENAME" code="660" description="Invalid character in filename." />
<error name="WORKINGDIRECTORYCEASEDTOEXIST" code="661" description="Working directory ceased to exist." />
<error name="DIRECTORYALREADYEXISTS" code="662" description="Directory already exists." />
<error name="WORKINGDIRECTORYNOTFOUND" code="663" description="Working Directory not found." />
<error name="INVALIDSIGNALREACTIONTIMEOUT" code="664" description="Invalid Signal Reaction Timeout." />
<error name="INVALIDSIGNALQUEUESIZE" code="665" description="Invalid Signal queue size." />
<error name="SIGNALALREADYTRIGGERED" code="666" description="Signal has already been triggered." />




</errors>


Expand All @@ -682,6 +712,10 @@
<option name="Testing" value="3"/>
</enum>

<enum name="StreamConnectionType">
<option name="JSONEventStream" value="1"/>
<option name="JPEGImageStream" value="2"/>
</enum>

<class name="Base">

Expand Down Expand Up @@ -712,6 +746,10 @@
<param name="IdleDelay" type="uint32" pass="return" description="Idle Delay." />
</method>

<method name="GetStreamType" description="Returns the stream type.">
<param name="StreamType" type="enum" class="StreamConnectionType" pass="return" description="Content type of the stream." />
</method>

</class>


Expand Down
173 changes: 172 additions & 1 deletion ACT/LibMCData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,8 @@
<error name="JOURNALVARIABLEALIASALREADYEXISTS" code="435" description="Journal variable alias already exists." />
<error name="INVALIDALIASINDEX" code="436" description="Invalid alias index" />
<error name="SOURCEOFJOURNALALIASNOTFOUND" code="437" description="Source of Journal Alias not found" />
<error name="COULDNOTFINDMACHINECONFIGURATIONTYPE" code="438" description="Could not find machine configuration type." />


</errors>

Expand Down Expand Up @@ -880,6 +882,10 @@
<method name="GetSHA2" description="returns the sha256 checksum of a storage stream.">
<param name="SHA2" type="string" pass="return" description="SHA1 String" />
</method>

<method name="EnsureSHA256IsValid" description="checks if the SHA256 is matching the computed SHA256 on disk. Will fail if there is a mismatch. Attention: Computation will take some time.">
</method>


<method name="GetSize" description="returns the size of a storage stream.">
<param name="Size" type="uint64" pass="return" description="Size" />
Expand Down Expand Up @@ -1497,7 +1503,6 @@
</class>



<!-- The UserList class is not thread safe and MUST ONLY be used in a single thread context... -->
<class name="UserList" parent="Base" description="List of users">

Expand Down Expand Up @@ -1741,6 +1746,156 @@

</class>

<!-- The MachineConfigurationVersion class is not thread safe and MUST ONLY be used in a single thread context... -->
<class name="MachineConfigurationVersion" parent="Base" description="Machine configuration XSD instance.">

<method name="GetVersionUUID" description="Returns the UUID.">
<param name="VersionUUID" type="string" pass="return" description="UUID of the configuration version." />
</method>

<method name="GetXSDUUID" description="Returns the UUID.">
<param name="XSDUUID" type="string" pass="return" description="UUID of the configuration XSD." />
</method>

<method name="GetTypeUUID" description="Returns the UUID of the corresponding Configuration type.">
<param name="TypeUUID" type="string" pass="return" description="UUID of the configuration type." />
</method>

<method name="GetParentUUID" description="Returns the UUID of the parent Configuration Version.">
<param name="ParentUUID" type="string" pass="return" description="UUID of the configuration version that is the parent of this version. Returns 00000000-0000-0000-0000-000000000000, if Version is the default configuration." />
</method>

<method name="GetSchemaType" description="Returns the Schema type of the configuration.">
<param name="SchemaType" type="string" pass="return" description="Schema type of the configuration type." />
</method>

<method name="GetXSDVersion" description="Returns the version number of the XSD in use..">
<param name="XSDVersion" type="uint32" pass="return" description="Returns the XSD version." />
</method>

<method name="GetXSDString" description="Returns the XSD in use as string..">
<param name="XSDString" type="string" pass="return" description="XSD String." />
</method>

<method name="GetConfigurationXMLString" description="Returns the configuration XML as String.">
<param name="XMLString" type="string" pass="return" description="XML String." />
</method>

<method name="CreateNewVersion" description="Creates a new configuration version from this version with the same XSD.">
<param name="XMLString" type="string" pass="in" description="New XML Configuration String. MUST conform to current XSD." />
<param name="UserUUID" type="string" pass="in" description="User UUID for logging the user who initiated the change." />
<param name="TimeStampUTC" type="string" pass="in" description="Current time in UTC." />
<param name="CurrentInstance" type="class" class="MachineConfigurationVersion" pass="return" description="returns the MachineConfigurationVersion instance."/>
</method>

<method name="MigrateToNewXSD" description="Creates a new configuration version from this version with another XSD.">
<param name="NewXSD" type="class" class="MachineConfigurationXSD" pass="in" description="New XSD to use. MUST be of the same type as the current. MUST have an increased version number."/>
<param name="XMLString" type="string" pass="in" description="New XML Configuration String. MUST conform to new XSD." />
<param name="UserUUID" type="string" pass="in" description="User UUID for logging the user who initiated the change." />
<param name="TimeStampUTC" type="string" pass="in" description="Current time in UTC." />
<param name="CurrentInstance" type="class" class="MachineConfigurationVersion" pass="return" description="returns the MachineConfigurationVersion instance."/>
</method>

</class>


<!-- The AlertIterator class is not thread safe and MUST ONLY be used in a single thread context... -->
<class name="MachineConfigurationVersionIterator" parent="Iterator">
<method name="GetCurrentVersion" description="Returns the version the iterator points at.">
<param name="CurrentInstance" type="handle" class="MachineConfigurationVersion" pass="return" description="returns the MachineConfigurationVersion instance."/>
</method>
</class>

<!-- The MachineConfigurationType class is not thread safe and MUST ONLY be used in a single thread context... -->
<class name="MachineConfigurationXSD" parent="Base" description="Machine configuration XSD instance.">

<method name="GetUUID" description="Returns the UUID.">
<param name="XSDUUID" type="string" pass="return" description="UUID of the configuration XSD." />
</method>

<method name="GetTypeUUID" description="Returns the UUID of the corresponding Configuration type.">
<param name="TypeUUID" type="string" pass="return" description="UUID of the configuration type." />
</method>

<method name="GetSchemaType" description="Returns the Schema type of the configuration.">
<param name="SchemaType" type="string" pass="return" description="Schema type of the configuration type." />
</method>

<method name="GetXSDVersion" description="Returns the version number of the XSD..">
<param name="XSDVersion" type="uint32" pass="return" description="Returns the XSD version." />
</method>

<method name="GetXSDString" description="Returns the XSD as string..">
<param name="XSDString" type="string" pass="return" description="XSD String." />
</method>

<method name="ListVersions" description="Lists all known Configuration version of the current XSD.">
<param name="VersionIterator" type="class" class="MachineConfigurationVersionIterator" pass="return" description="Returns a list of versions." />
</method>

</class>

<!-- The MachineConfigurationType class is not thread safe and MUST ONLY be used in a single thread context... -->
<class name="MachineConfigurationType" parent="Base" description="Machine configuration type instance.">

<method name="GetUUID" description="Returns the UUID.">
<param name="TypeUUID" type="string" pass="return" description="UUID of the configuration type." />
</method>

<method name="GetName" description="Returns the Name.">
<param name="Name" type="string" pass="return" description="Name of the configuration type." />
</method>

<method name="GetSchemaType" description="Returns the Schema type of the configuration.">
<param name="SchemaType" type="string" pass="return" description="Schema type of the configuration type." />
</method>

<method name="GetLatestXSD" description="Returns the latest Machine Configuration XSD.">
<param name="XSDInstance" type="class" class="MachineConfigurationXSD" pass="return" description="Returns the latest XSD of the configuration type." />
</method>

<method name="GetLatestXSDVersion" description="Returns the latest Machine Configuration XSD Version.">
<param name="XSDVersion" type="uint32" pass="return" description="Returns the latest XSD version, or 0 if no XSD exists." />
</method>

<method name="FindXSDByUUID" description="Finds Machine Configuration XSD by UUID.">
<param name="XSDUUID" type="string" pass="in" description="UUID of the configuration XSD." />
<param name="XSDInstance" type="class" class="MachineConfigurationXSD" pass="return" description="Returns the latest XSD of the configuration type." />
</method>

<method name="CreateNewXSD" description="Creates a new XSD Version. Fails if version already exists or is not incrementing.">
<param name="XSDString" type="string" pass="in" description="XSD String of the version. MUST be incremental." />
<param name="XSDVersion" type="uint32" pass="in" description="New Version to add. MUST be larger than GetLatestXSDVersion." />
<param name="DefaultConfigurationXML" type="string" pass="in" description="Default configuration XML to use for this XSD. MUST conform to XSD in question." />
<param name="XSDInstance" type="class" class="MachineConfigurationXSD" pass="return" description="Returns the new XSD of the configuration type." />
</method>

<method name="GetXSDVersion" description="Returns an Configuration XSD Version.">
<param name="XSDVersion" type="uint32" pass="in" description="Version to retrieve." />
<param name="XSDInstance" type="class" class="MachineConfigurationXSD" pass="return" description="Returns the XSD of the configuration type with the appropriate version number or null if it does not exist." />
</method>

<method name="ListVersions" description="Lists all known Configuration version of the current type.">
<param name="VersionIterator" type="class" class="MachineConfigurationVersionIterator" pass="return" description="Returns a list of versions." />
</method>

<method name="FindVersionByUUID" description="Finds a Configuration version by UUID.">
<param name="VersionUUID" type="string" pass="in" description="UUID of the configuration version." />
<param name="Version" type="optionalclass" class="MachineConfigurationVersion" pass="return" description="Returns the specific version or null if version does not exist or is of a different type." />
</method>

<method name="GetActiveVersion" description="Returns the active Configuration version.">
<param name="VersionUUID" type="string" pass="in" description="UUID of the configuration version." />
<param name="Version" type="optionalclass" class="MachineConfigurationVersion" pass="return" description="Returns the specific version or null if no active version exists for this type." />
</method>

<method name="GetLatestVersion" description="Returns the latest Configuration version by Timestamp.">
<param name="Version" type="optionalclass" class="MachineConfigurationVersion" pass="return" description="Returns the specific version or null if no version exists for this type." />
</method>

</class>


<!-- The InstallationInformation class is not thread safe and MUST ONLY be used in a single thread context... -->
<class name="InstallationInformation" parent="Base" description="Installation information instance. Gives a snapshot of the installation information at creation of the instance. Does not update in the unlikely event of them changing.">

Expand Down Expand Up @@ -1834,6 +1989,22 @@
<param name="HasCallback" type="bool" pass="return" description="Flag if log callback has been set." />
</method>

<method name="FindConfigurationTypeBySchema" description="Retrieves a configuration type by schema.">
<param name="SchemaType" type="string" pass="in" description="Configuration Schema Type String" />
<param name="IteratorInstance" type="optionalclass" class="MachineConfigurationType" pass="return" description="Returns the Configuration Type instance, if it exists, NULL otherwise." />
</method>

<method name="FindConfigurationTypeByUUID" description="Retrieves a configuration type by uuid.">
<param name="UUID" type="string" pass="in" description="UUID String. Fails if not a proper UUID formatted string." />
<param name="IteratorInstance" type="optionalclass" class="MachineConfigurationType" pass="return" description="Returns the Configuration Type instance, if it exists, NULL otherwise." />
</method>

<method name="CreateConfigurationType" description="Create a new configuration type for a schema. Fails if schema already exists..">
<param name="SchemaType" type="string" pass="in" description="Configuration Schema Type String" />
<param name="Name" type="string" pass="in" description="Name of the type." />
<param name="IteratorInstance" type="class" class="MachineConfigurationType" pass="return" description="Returns the Configuration Type instance." />
</method>

<method name="TriggerLogCallback" description="Triggers the log callback. Fails if no log callback has been set.">
<param name="LogMessage" type="string" pass="in" description="Log message to be logged."/>
<param name="SubSystem" type="string" pass="in" description="SubSystem of Log Message."/>
Expand Down
Loading