-
Notifications
You must be signed in to change notification settings - Fork 5
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
Object id additions #20
Comments
Can inject schema entries like this: wyfo/apischema#128 |
Here's an idea.
module: pmac
interfaces:
- name: PmacComms
args:
- type: id
name: name
description: Asyn port name
definitions:
- name: PmacAsynIPPort
implements: pmac.PmacComms
args:
# inherits name from PmacComms
- type: str
name: IP
description: IP address of pmac
script:
- pmacAsynIPConfigure({{name}}, {{IP if ":" in IP else IP + ":1025"}})
- name: Geobrick
args:
- type: pmac.PmacComms
name: PORT
description: Asyn port name for PmacAsynIPPort to connect to
# more fields
script:
- pmacCreateController({{name}}, {{PORT.name}}, 0, {{numAxes}}, {{movingPoll}}, {{idlePoll}}) What do you reckon? |
We decided:
definitions:
- name: PmacAsynIPPort
args:
- type: id
name: name
description: Asyn port name
- type: str
name: IP
description: IP address of pmac
script:
- pmacAsynIPConfigure({{name}}, {{IP if ":" in IP else IP + ":1025"}})
- name: Geobrick
args:
- type: object
name: PORT
description: Asyn port name for PmacAsynIPPort to connect to
# more fields
script:
- pmacCreateController({{name}}, {{PORT.name}}, 0, {{numAxes}}, {{movingPoll}}, {{idlePoll}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment we want to make a
pmac.DlsPmacAsynMotor
have apmac.Geobrick
as aPORT
. But what if we wanted to allow apmac.PowerBrick
to be passed as well? iocbuilder allowed us to make apmac.DeltaTau
thatpmac.Geobrick
could subclass from, should be allow the same inheritance here?Once we have decided that, we need to put enough information in the schema to allow the GUI to restrict selection of
PORT
topmac.DeltaTau
instances. This is not a supported concept in JSON schema, so we need to invent our own vocab like https://gregsdennis.github.io/json-everything/usage/vocabs-unique-keys.htmlThe text was updated successfully, but these errors were encountered: