Skip to content

Conversation

@alexanderoster
Copy link
Owner

No description provided.

alexanderoster and others added 19 commits January 15, 2026 01:13
* Add GetCreatedTimestamp and GetLastExecutionTimestamp to Build interface

* Feature: Add GetRecentBuildJobs() API to UIEnvironment

Add new API method to retrieve recent validated build jobs for
touchscreen UI display.

Changes:
1. **IDL Definition** (ACT/LibMCEnv.xml):
   - Added BuildIterator class following BuildExecutionIterator pattern
   - Added GetRecentBuildJobs(maxCount) method to UIEnvironment

2. **BuildIterator Implementation**:
   - New class CBuildIterator (libmcenv_builditerator.hpp/cpp)
   - Implements GetCurrentBuild() to return IBuild instances
   - Follows standard AMCF iterator pattern

3. **UIEnvironment Implementation** (libmcenv_uienvironment.cpp):
   - GetRecentBuildJobs() queries validated build jobs via DataModel
   - Returns BuildIterator with most recent jobs (newest first)
   - Limited by maxCount parameter

4. **CBuild Factory Methods** (libmcenv_build.cpp/hpp):
   - Added makeFrom() and makeSharedFrom() static methods
   - Enables BuildIterator to wrap existing build job instances

This API enables plugins to access build job data for UI display
without direct DataModel access, maintaining proper abstraction.

---

InterfacesCode: Regenerate interface files from ACT for GetRecentBuildJobs API

Regenerated C++ interface bindings and headers using ACT (Automatic
Component Toolkit) after adding GetRecentBuildJobs() method to
LibMCEnv.xml.

Generated/Updated files:
- Framework/HeadersDev/CppDynamic/libmcenv_dynamic.hpp
- Framework/HeadersDev/CppDynamic/libmcenv_dynamic.h
- Framework/HeadersDev/CppDynamic/libmcenv_types.hpp
- Framework/InterfacesCore/libmcenv_abi.hpp
- Framework/InterfacesCore/libmcenv_interfaces.hpp
- Framework/InterfacesCore/libmcenv_interfacewrapper.cpp
- Framework/InterfacesCore/libmcenv_types.hpp
- ACT/act.linux (binary timestamp update)

These files are auto-generated by running: ./act.linux LibMCEnv.xml
…ystem (#62)

E.g. to exclude drivers from build:
./build_clean_linux64.sh -DINCLUDE_DRIVERS=OFF
Removed redundant null checks for pValueBuffer and m_PixelData, these checks stops the two-call pattern of the GetPixels().
…f child (#64)

Bug: AddObjectValue() and AddArrayValue() were returning a pointer to
the parent object instead of the newly created child value, causing
JSON structure corruption.

Fix:
1. Call AddMember() to add the member to the parent
2. Use &(*m_pInstance)[sName.c_str()] to get pointer to the newly
   added child value in the parent's member map

Impact:
This bug affected any endpoint using AddArrayValue() or nested
AddObjectValue(), such as my /api/ext/builds/list which uses arrays.
The error "Referenced JSON value is not array" occurred.
@alexanderoster alexanderoster merged commit 5409e4b into master Jan 18, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

4 participants