some stuff
This commit is contained in:
1
TODO.md
1
TODO.md
@@ -1,5 +1,6 @@
|
|||||||
# For MVP functionality
|
# For MVP functionality
|
||||||
|
|
||||||
|
- stop doing linear scans and do hashmaps smh (ls /dev is awfully slow and this MIGHT be why)
|
||||||
- volatile filesystem
|
- volatile filesystem
|
||||||
- device info
|
- device info
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,11 @@ function component.list(ctype, exact)
|
|||||||
return desired
|
return desired
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local allInvoks = 0
|
||||||
|
|
||||||
function component.invoke(address, method, ...)
|
function component.invoke(address, method, ...)
|
||||||
|
allInvoks = allInvoks + 1
|
||||||
|
print(allInvoks)
|
||||||
local t = {pcall(cinvoke, address, method, ...)}
|
local t = {pcall(cinvoke, address, method, ...)}
|
||||||
if computer.energy() <= 0 then sysyield() end -- out of power
|
if computer.energy() <= 0 then sysyield() end -- out of power
|
||||||
if computer.isOverused() then sysyield() end -- overused
|
if computer.isOverused() then sysyield() end -- overused
|
||||||
|
|||||||
@@ -769,7 +769,7 @@ nn_Computer *nn_createComputer(nn_Universe *universe, void *userdata, const char
|
|||||||
c->desiredArch.name = NULL;
|
c->desiredArch.name = NULL;
|
||||||
c->archState = NULL;
|
c->archState = NULL;
|
||||||
|
|
||||||
c->totalCallBudget = 1000;
|
c->totalCallBudget = 50000;
|
||||||
c->callBudget = c->totalCallBudget;
|
c->callBudget = c->totalCallBudget;
|
||||||
|
|
||||||
c->componentCap = maxComponents;
|
c->componentCap = maxComponents;
|
||||||
@@ -2221,15 +2221,15 @@ nn_ComponentState *nn_createEEPROM(nn_Universe *universe, const nn_EEPROM *eepro
|
|||||||
{"getDataSize", "function(): number - Get the storage capacity of the EEPROM data.", NN_DIRECT},
|
{"getDataSize", "function(): number - Get the storage capacity of the EEPROM data.", NN_DIRECT},
|
||||||
{"getLabel", "function(): string - Get the EEPROM label", NN_INDIRECT},
|
{"getLabel", "function(): string - Get the EEPROM label", NN_INDIRECT},
|
||||||
{"setLabel", "function(label: string): string - Set the EEPROM label and return what was actually set, which may be truncated.", NN_INDIRECT},
|
{"setLabel", "function(label: string): string - Set the EEPROM label and return what was actually set, which may be truncated.", NN_INDIRECT},
|
||||||
{"get", "function(): string - Get the current EEPROM contents.", NN_INDIRECT},
|
{"get", "function(): string - Get the current EEPROM contents.", NN_DIRECT},
|
||||||
{"getData", "function(): string - Get the current EEPROM data contents.", NN_INDIRECT},
|
{"getData", "function(): string - Get the current EEPROM data contents.", NN_DIRECT},
|
||||||
{"set", "function(data: string) - Set the current EEPROM contents.", NN_INDIRECT},
|
{"set", "function(data: string) - Set the current EEPROM contents.", NN_DIRECT},
|
||||||
{"setData", "function(data: string) - Set the current EEPROM data contents.", NN_INDIRECT},
|
{"setData", "function(data: string) - Set the current EEPROM data contents.", NN_DIRECT},
|
||||||
{"getArchitecture", "function(): string - Get the current EEPROM architecture intended.", NN_INDIRECT},
|
{"getArchitecture", "function(): string - Get the current EEPROM architecture intended.", NN_DIRECT},
|
||||||
{"setArchitecture", "function(data: string) - Set the current EEPROM architecture intended.", NN_INDIRECT},
|
{"setArchitecture", "function(data: string) - Set the current EEPROM architecture intended.", NN_DIRECT},
|
||||||
{"isReadOnly", "function(): boolean - Returns whether the EEPROM is read-only.", NN_DIRECT},
|
{"isReadOnly", "function(): boolean - Returns whether the EEPROM is read-only.", NN_DIRECT},
|
||||||
{"makeReadonly", "function(checksum: string) - Makes the EEPROM read-only, this cannot be undone.", NN_INDIRECT},
|
{"makeReadonly", "function(checksum: string) - Makes the EEPROM read-only, this cannot be undone.", NN_INDIRECT},
|
||||||
{"getChecksum", "function(): string - Returns a simple checksum of the EEPROM's contents and data.", NN_INDIRECT},
|
{"getChecksum", "function(): string - Returns a simple checksum of the EEPROM's contents and data.", NN_DIRECT},
|
||||||
{NULL, NULL, NN_INDIRECT},
|
{NULL, NULL, NN_INDIRECT},
|
||||||
};
|
};
|
||||||
nn_ComponentState *t = nn_createComponentState(universe, "eeprom", state, methods, nn_eeprom_handler);
|
nn_ComponentState *t = nn_createComponentState(universe, "eeprom", state, methods, nn_eeprom_handler);
|
||||||
|
|||||||
Reference in New Issue
Block a user