Changeset 35381
- Timestamp:
- Apr 9, 2013, 12:09:52 PM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130307/psModules/src/camera
- Files:
-
- 2 edited
-
pmFPAfileDefine.c (modified) (6 diffs)
-
pmFPAfileDefine.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307/psModules/src/camera/pmFPAfileDefine.c
r35379 r35381 708 708 } 709 709 710 711 pmFPAfile *pmFPAfileDefineFromArgs(bool *success, pmConfig *config, 712 const char *filename, const char *argname) 710 // find the file associated with the argname & generate a pmFPAfile for it based on the filerule 711 pmFPAfile *pmFPAfileDefineFromArgs(bool *success, pmConfig *config, const char *filename, const char *argname) 713 712 { 714 713 PS_ASSERT_PTR_NON_NULL(config, NULL); … … 742 741 } 743 742 744 pmFPAfile *pmFPAfileBindFromArgs(bool *success, pmFPAfile *input, pmConfig *config, 745 const char *filename, const char *argname)743 // find the file associated with the argname & bind it to the given pmFPAfile for it based on the filerule 744 pmFPAfile *pmFPAfileBindFromArgs(bool *success, pmFPAfile *input, pmConfig *config, const char *filename, const char *argname) 746 745 { 747 746 PS_ASSERT_PTR_NON_NULL(input, NULL); … … 776 775 } 777 776 778 pmFPAfile *pmFPAfileDefineSingleFromArgs(bool *success, pmConfig *config, const char *filename, 779 const char *argname, int entry)777 // find the specific file associated with the argname & generate a pmFPAfile for it based on the filerule 778 pmFPAfile *pmFPAfileDefineSingleFromArgs(bool *success, pmConfig *config, const char *filename, const char *argname, int entry) 780 779 { 781 780 PS_ASSERT_PTR_NON_NULL(config, NULL); … … 813 812 } 814 813 814 // find the file in the config list & generate a pmFPAfile for it based on the filerule 815 815 pmFPAfile *pmFPAfileDefineFromRun(bool *success, pmFPAfile *bind, pmConfig *config, const char *filename) 816 816 { … … 836 836 } 837 837 838 // find the files in the config list & generate an array of pmFPAfiles for them based on the filerule 838 839 psArray *pmFPAfileDefineMultipleFromRun(bool *success, psArray *bind, pmConfig *config, const char *filename) 839 840 { … … 880 881 881 882 return files; 883 } 884 885 // find the file associated with the argname & generate a pmFPAfile for it based on the filerule 886 pmFPAfile *pmFPAfileDefineNewConfig(bool *success, pmConfig **outConfig, pmConfig *sysConfig, const char *filename, const char *argname) 887 { 888 PS_ASSERT_PTR_NON_NULL(outConfig, NULL); 889 PS_ASSERT_PTR_NON_NULL(sysConfig, NULL); 890 PS_ASSERT_STRING_NON_EMPTY(filename, NULL); 891 PS_ASSERT_STRING_NON_EMPTY(argname, NULL); 892 893 // Search the argument data for the named fileset (argname) 894 bool status; // Status of MD lookup 895 psArray *filenames = psMetadataLookupPtr(&status, sysConfig->arguments, argname); // Filenames for file 896 if (!status) { 897 if (success) { 898 *success = true; 899 } 900 return NULL; 901 } 902 if (filenames->n == 0) { 903 psError(PM_ERR_CONFIG, true, "No files in array in %s in arguments", argname); 904 if (success) { 905 *success = false; 906 } 907 return NULL; 908 } 909 910 pmFPAfile *file = fpaFileDefineFromArray(outConfig, sysConfig, NULL, filename, filenames); // File of interest 911 912 if (success) { 913 *success = file ? true : false; 914 } 915 916 return file; 882 917 } 883 918 -
branches/eam_branches/ipp-20130307/psModules/src/camera/pmFPAfileDefine.h
r27657 r35381 81 81 const char *filename ///< Name of file 82 82 ); 83 84 // find the file associated with the argname & generate a pmFPAfile for it based on the filerule 85 pmFPAfile *pmFPAfileDefineNewConfig( 86 bool *success, ///< Found files? 87 pmConfig **outConfig, ///< output configuration for this file 88 pmConfig *sysConfig, ///< existing system config info 89 const char *filename, ///< name of filerule 90 const char *argname ///< argument entry 91 ); 92 83 93 84 94 // look for the given argname on the argument list. find the give filename from the file rules
Note:
See TracChangeset
for help on using the changeset viewer.
