[INSTRM-28] Provide an id object to track site, camera, spectrograph, etc. Created: 01/Dec/16 Updated: 11/Jan/19 Resolved: 11/Jan/19 |
|
| Status: | Done |
| Project: | Instrument control development |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | cloomis | Assignee: | cloomis |
| Resolution: | Done | Votes: | 0 |
| Labels: | SM1 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Story Points: | 2 | ||||||||
| Epic Link: | Red channel perf test | ||||||||
| Sprint: | 2019 B | ||||||||
| Reviewers: | arnaud.lefur | ||||||||
| Description |
|
The image acquisition actors need to know their "site" in order to set the file prefix (PF$(site)A). Besides that, several actors need to know what camera/dewar/spectrograph they are connected to. I think I'll make a pfscore module in tron_actorcore for these kinds of things. I'm using a SpectroIds class in the ccd actor which I'll move over for a start. By default the identity is picked up from the hostname (e.g. bee_r1.pfs), but can be overridden. The site cannot be deduced in that way, so right now I'm using a $PFS_SITE environment variable. |
| Comments |
| Comment by shimono [ 01/Dec/16 ] |
|
One possibility could be to set in domain part of FQDN from DHCP, like bee_r1.pfs_lam...? |
| Comment by cloomis [ 16/Mar/17 ] |
|
Nice idea, but I think it would be useful to have a common domain. In the end I added a TXT record, yielding "J", "L", "S", etc. |
| Comment by shimono [ 29/Mar/17 ] |
|
Need some lines to be copied into |
| Comment by shimono [ 18/Apr/17 ] |
|
a line has added in dnsmasq configuration requirement at |
| Comment by cloomis [ 23/Jun/17 ] |
|
Proof-of-concept committed. Since he needs to use it I'm asking Arnaud to review. |
| Comment by arnaud.lefur [ 23/Jun/17 ] |
|
This seems good to me. def hostnameId():
hostname = socket.gethostname()
hostname = os.path.splitext(hostname)[0]
_, hostid = hostname.split('enu')
return hostid
|
| Comment by cloomis [ 11/Jan/19 ] |
|
Merged at 94d87aa, tagged 1.9.7 |