Skip to content

Commit 2b4181c

Browse files
committed
Add docstrings
1 parent aa08de6 commit 2b4181c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/blueapi/BlueapiComponents.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
*/
4044
function 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+
*/
4960
function parseInstrumentSession(visit: string): string {
5061
let instrumentSession: string | undefined;
5162
if (visit === "not connected" || visit === "undefined") {

0 commit comments

Comments
 (0)