-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first pass of SubEntity implementation
- Loading branch information
Showing
15 changed files
with
6,578 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from typing import Sequence | ||
|
||
from pydantic import BaseModel, Field, model_validator | ||
|
||
|
||
class SubEntity(BaseModel, extra="allow"): | ||
""" | ||
A loosely defined class to declare the Entities | ||
in an ibek.support.yaml file in the CollectionDefinition section | ||
""" | ||
|
||
type: str = Field(description="The type of this entity") | ||
|
||
@model_validator(mode="after") | ||
def store(self): | ||
""" | ||
Store the SubEntity instance in the global list of SubEntities | ||
""" | ||
|
||
# empty extra implies this is the base class being validated | ||
if self.model_extra is not None: | ||
sub_entities.append(self) | ||
print(f"sub-entity {self.type}") | ||
return self | ||
|
||
|
||
sub_entities: Sequence[SubEntity] = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# yaml-language-server: $schema=../schemas/quadem.ibek.ioc.schema.json | ||
|
||
ioc_name: "{{ __utils__.get_env('IOC_NAME') }}" | ||
description: Example TetrAMM for BL03I | ||
|
||
entities: | ||
- type: quadEM.TetrAMM | ||
PORT: XBPM1.DRV | ||
P: BL03I-EA-XBPM-01 | ||
R: ":DRV:" | ||
QSIZE: 20 | ||
IP: "172.23.103.85:10001" | ||
|
||
- type: quadEM.Plugins | ||
DEVICE: XBPM1.DRV | ||
PORTPREFIX: XBPM1 | ||
STAT_NCHAN: 1000 | ||
STAT_XSIZE: 10000 | ||
|
||
# - { type: ADCore.NDStats, PORT: "{{PORTPREFIX}}.STATS.I1", R: Cur1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<display version="2.0.0"> | ||
<name>test-bad-db-ioc</name> | ||
<x>0</x> | ||
<y use_class="true">0</y> | ||
<width>10</width> | ||
<height>35</height> | ||
<grid_step_x>4</grid_step_x> | ||
<grid_step_y>4</grid_step_y> | ||
<widget type="label" version="2.0.0"> | ||
<name>Title</name> | ||
<class>TITLE</class> | ||
<text>test-bad-db-ioc</text> | ||
<x use_class="true">0</x> | ||
<y use_class="true">0</y> | ||
<width>10</width> | ||
<height>25</height> | ||
<font use_class="true"> | ||
<font name="Header 1" family="Liberation Sans" style="BOLD" size="22.0"> | ||
</font> | ||
</font> | ||
<foreground_color use_class="true"> | ||
<color name="Text" red="0" green="0" blue="0"> | ||
</color> | ||
</foreground_color> | ||
<transparent use_class="true">true</transparent> | ||
<horizontal_alignment>1</horizontal_alignment> | ||
</widget> | ||
</display> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
############################################################################# | ||
# DB substitution file generated by http://github.com/epics-containers/ibek # | ||
############################################################################# | ||
|
||
file "$(QUADEM)/db/TetrAMM.template" { | ||
pattern | ||
{ "P", "R", "PORT" } | ||
{ "BL03I-EA-XBPM-01", ":DRV:", "XBPM1.DRV" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# EPICS IOC Startup Script generated by https://github.com/epics-containers/ibek | ||
|
||
cd "/epics/ioc" | ||
dbLoadDatabase dbd/ioc.dbd | ||
ioc_registerRecordDeviceDriver pdbbase | ||
|
||
|
||
dbLoadRecords /epics/runtime/ioc.db | ||
iocInit | ||
|
Oops, something went wrong.