File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,10 @@ type RunPlanButtonProps = {
3737// This will be another PR
3838// See https://github.com/DiamondLightSource/mx-daq-ui/issues/71
3939
40+ /**
41+ * Read the full visit path from the visit PV set by the beamline staff.
42+ * @returns {string } the full visit pV /dls/i24/data/{year}/{visit}
43+ */
4044function readVisitFromPv ( ) : string {
4145 const fullVisitPath : RawValue = ReadPvRawValue ( {
4246 label : "visit" ,
@@ -46,6 +50,13 @@ function readVisitFromPv(): string {
4650 return visitString ;
4751}
4852
53+ /**
54+ * Parse the full visit path and return only the instrument session.
55+ * An error will be raised if the instrument session value is undefined or
56+ * if the PV is not connected.
57+ * @param {string } visit The full visit path
58+ * @returns {string } Only the instrument session part of the visit path
59+ */
4960function parseInstrumentSession ( visit : string ) : string {
5061 let instrumentSession : string | undefined ;
5162 if ( visit === "not connected" || visit === "undefined" ) {
You can’t perform that action at this time.
0 commit comments