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

Check and implement suggested changes #7

Open
Hobadee opened this issue Feb 24, 2020 · 0 comments
Open

Check and implement suggested changes #7

Hobadee opened this issue Feb 24, 2020 · 0 comments

Comments

@Hobadee
Copy link
Owner

Hobadee commented Feb 24, 2020

I received this private message on the MA-Share forums. Verify and implement suggestions.


Thanks for keeping your reference of MA2 LUA updated.
Maybe I can help to remove some questionmarks:

gma.export()
Yes, this will export a table into a xml-file. If no path is given, the file will be created in the temp-folder. I've used this with onPC and the file will be inside "C:\ProgramData\MA Lighting Technologies\grandMA\gma2_V_x.x.x\temp"
I didn't try the other export-functions but I expect them to export as csv or json.

gma.gettime()
With onPC this function returns the runtime of the system, not the clock-time. So, even if two onPC are in same session and MA syncs the clock, gma.gettime() will return different values on different systems. I think this needs to be noticed.
To get the clock-time, I used os.time(), but this is only testet for Windows onPC so far. Maybe os.time() is not available on MA hardware.

gma.network.getslot()
Returns the slotnumber of the device the function is called on. This slotnumber can be used for gma.network.getmanetslot().

gma.network.getmanetslot()
I've tried parameters from 0 to 255 as a slot-number. Slot 255 is always available and seams to be a standalone desk, but I'm not sure. The first console of a session has slot 30. Other stations joining the session will get the next free number below 30. The first MA3D gets slot 95.
So, with known limits of MA device-classes for a session this seams to be correct:
'# slot 30 to 0 are maximum 31 class A devices (consoles, onPC, RPU, NPU) inside session
'# slot 95 to 31 are maximum 64 class B devices (3D, VPU) inside session
If you export the slot-tables to xml and open the files you see all the information of the device. I've used slots to count number of devices inside a session. See my new post at:
http://www.ma-share.net/forum/read.php?14,65331

gma.network.gethostdata()
yes, it's an IP as an argument. The result is again a table with all the information about the device behind the given IP.

gma.network.getperformance()
returns a table with data that look like the values from the performance-view on the desk.

gma.user.getcmddest()
This returns a handle that could be used with gma.show.getobj.name() which then returns a string with the current commandline destination. In general this would be root, but might also be EditSetup or LiveSetup.

This is what I used so far. Hope, this helps creating a good LUA documentation - even if MA2 will be replaced by MA3 soon, but maybe this will be translated to MA3, too.

If you like, you may use this information to improve your reference, but keep in mind, I'm just a user, no MA-guy. All I know is by trial and error and might be wrong or not complete.

regards
Gralf

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

1 participant